Water affair edge intelligent gateway off-line state data efficient caching method based on multi-modal data

By constructing a synchronous sampling timeline map and a modal acquisition reference matrix, temporary sensor restarts are identified and modal inconsistencies are marked, thus solving the problem of data inconsistency in the offline state of the water edge smart gateway and improving the integrity of the data structure and the reliability of the system.

CN121125763BActive Publication Date: 2026-03-17SHAANXI WATER GRP INTELLIGENT DATA CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-01
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

In existing technologies, when the smart gateway at the water edge is offline, temporary restarts of sensors due to instantaneous voltage fluctuations cause loss of modal data, resulting in data inconsistency. This affects the accuracy of AI model judgments and the source analysis of water quality anomalies, posing a systemic risk.

Method used

By constructing a synchronous sampling timeline graph to identify temporary sensor restarts, a modal difference vector is generated using a modal acquisition reference matrix to identify modal inconsistencies between the image and the sensor at the same time point, and the inconsistencies are marked by field insertion. A structural integrity risk score is constructed by combining acquisition volatility and confidence weight to achieve hierarchical encapsulation of data differences.

Benefits of technology

It accurately identifies temporary sensor restarts, precisely locates modal data gaps, prevents data inconsistency and mistransmission, improves the structural integrity of multimodal data under offline conditions, and reduces the risk of misjudgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121125763B_ABST
    Figure CN121125763B_ABST
Patent Text Reader

Abstract

This invention discloses an efficient offline state data caching method for water edge smart gateways based on multimodal data, belonging to the field of water edge smart gateway technology. The method includes the following steps: When a sensor temporary restart is detected, a modal acquisition reference matrix is ​​constructed using the multimodal data structure of historical sampling periods. A modal difference vector is generated by combining this matrix with the actual acquisition content of the current period to determine the modal data gap state under the temporary sensor restart condition. Based on the determined modal data gap state, the image data acquisition record at the current time point is matched and analyzed with the modal data gap vector at the current time point to identify modal inconsistencies between the image and the sensor cached at the same time point. This invention solves the problem of the inability to identify and mark modal gaps in multimodal data under offline conditions, achieving modal consistency identification and structural integrity assurance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of water edge smart gateway technology, specifically to an efficient caching method for offline status data of water edge smart gateways based on multimodal data. Background Technology

[0002] Efficient offline status data caching of water edge smart gateways based on multimodal data refers to the local, efficient caching and orderly management of critical water management data in a smart water system when the edge smart gateway is offline due to network connection interruption or unstable communication. This is achieved using a mechanism that supports multiple data types (such as sensor data, water quality monitoring images, control command logs, and equipment operating status) and has intelligent caching strategies. Existing technologies typically integrate a multimodal data parsing module and a unified data structure modeling system into the edge gateway device. Data from different sources and formats is converted and uniformly encoded before being stored in a local caching system. A cache priority queue mechanism is used to dynamically manage and evict cached content based on factors such as data importance, real-time performance, and space usage. Furthermore, a status monitoring module monitors network connectivity in real time, triggering caching strategy switching in offline states and initiating a data synchronization module upon network recovery. Breakpoint resumption and data integrity verification methods are employed to ensure that cached data during offline periods is accurately and completely uploaded to the cloud system. The entire technical process mainly includes five key links: multimodal data acquisition and classification, data format standardization and storage, dynamic scheduling of cache space, offline status identification and caching strategy switching, and data synchronization and recovery mechanism. These links work together to achieve efficient caching of multimodal data in offline environments and subsequent reliable transmission of data by the edge gateway, thereby improving the data integrity assurance capability and operational continuity of the water system in complex communication environments.

[0003] The existing technology has the following shortcomings:

[0004] When a smart water edge gateway is offline and performing efficient multimodal data caching, a temporary restart of a sensor due to instantaneous voltage fluctuations often results in one or two missing data sets for that modality within the current sampling period. Meanwhile, other modalities (such as image frames) can still be collected and cached normally, creating a "data inconsistency" situation where only partial modal data exists at the same timestamp. Existing multimodal data caching mechanisms typically employ a weak binding strategy based on a unified timestamp, using the presence of any modal data as the sole criterion for determining the completeness of that timestamp's data. They lack modal integrity verification mechanisms or structural markers for missing data, causing the system to fail to identify modal gaps within that time period and incorrectly classify that period as a complete data segment for caching. Existing efficient offline data caching technology for smart water edge gateways based on multimodal data cannot identify and mark modal inconsistencies between images and sensors cached at the same time point based on the modal data gaps caused by temporary sensor restarts, resulting in hidden structural incompleteness in subsequently uploaded data. This problem not only affects the accuracy of AI models in judging pollution events, leading to risks such as false alarms and missed alarms, but also interferes with the source tracing analysis of water quality anomalies and water emergency response decisions, causing significant systemic risks.

[0005] The information disclosed in the background section is only intended to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0006] The purpose of this invention is to provide an efficient method for caching offline status data of a water edge smart gateway based on multimodal data, so as to solve the problems mentioned in the background art.

[0007] To achieve the above objectives, the present invention provides the following technical solution: an efficient method for caching offline status data of a water affairs edge smart gateway based on multimodal data, specifically including the following steps:

[0008] S1. When the water edge smart gateway is offline, construct a synchronous sampling timeline map based on the time series of various sensors in the multimodal data, and identify whether the sensor has temporarily restarted by calculating the variability rate of the sampling interval of the continuous sampling period.

[0009] S2. When a temporary sensor restart is detected, a modal acquisition reference matrix is ​​constructed using the multimodal data structure of the historical sampling period. A modal difference vector is generated by combining the actual acquisition content of the current period to determine the modal data gap state under the temporary sensor restart situation.

[0010] S3. Based on the determined modal data gap state, perform matching analysis between the image data acquisition record at the current time point and the modal data gap vector at the current time point to identify modal inconsistencies between the image and the sensor in the same time point cache, and mark the inconsistencies in the cached data structure by field insertion.

[0011] S4. Based on the marked inconsistent cached data content, and combined with the collection volatility and credibility weight of multimodal data in this period, construct the structural integrity risk score result, and divide the cached data into differential graded encapsulation strategy paths according to the score result.

[0012] S5. During the continuous operation of the cache cycle, the parameter update factor is generated based on the uploaded data and the feedback is used to adaptively adjust the conditions for identifying whether a sensor has temporarily restarted, the rules for determining the state of the modal data gap, and the logic for marking modal inconsistencies, so as to realize the consistent dynamic control of the multimodal data cache structure of the water edge smart gateway in the offline state.

[0013] Preferably, S1 is as follows:

[0014] While the water edge smart gateway is offline, based on the time series data generated by various sensors in the offline state in the multimodal data, the sampling timestamps of each type of sensor in the continuous sampling period are extracted, a multi-channel sampling timestamp sequence set is generated and rearranged in chronological order;

[0015] A sampling time interval sequence is constructed based on the sampling timestamp sequence of each type of sensor. After length normalization of each sequence, the sequences are spliced ​​together by channel to construct a synchronous sampling timeline map. The map is indexed by channel and the sampling interval is the dimension.

[0016] Calculate the sampling interval variation rate of each type of sensor in the synchronous sampling timeline graph, compare the calculation result with the preset variation rate threshold, and identify the sensor as having temporarily restarted when the variation rate of any sensor exceeds the threshold.

[0017] Preferably, S2 specifically includes the following steps:

[0018] S201. When a temporary sensor restart is detected, select historical sampling periods within multiple normal acquisition phases, extract the multimodal data structures of various sensors in each period, construct a binary matrix based on whether the acquisition was successful, assign a value of one for successful acquisition and a value of zero for failed acquisition, arrange them to form a modal acquisition reference matrix, with columns representing sensor types and rows representing historical periods.

[0019] S202. Extract the actual acquisition content of the current period, encode it into the current modal acquisition vector in the same format as the modal acquisition reference matrix, calculate the difference between the current modal acquisition vector and each row of the modal acquisition reference matrix bit by bit, and generate a modal difference vector. The position with a difference of negative one indicates the modal acquisition behavior that is expected to exist but is actually missing.

[0020] S203. Extract the position index of the element with a value of negative one in the modal difference vector, extract the sensor type corresponding to each position index, and form a set of sensor types that should have been collected but were not collected in the historical sampling mode in the current period. This set serves as the modal data gap state in the case of temporary sensor restart, and is used for modal inconsistency identification and cache data structure marking in subsequent processing.

[0021] Preferably, S202 specifically refers to:

[0022] Extract the actual data collected in the current period, encode it according to the data collection success status of various sensors with one for successful collection and zero for failed collection, construct the current mode acquisition vector, and ensure that the vector length and arrangement order are consistent with the mode acquisition reference matrix;

[0023] Subtract the current modal acquisition vector from the vector corresponding to each historical sampling period in the modal acquisition reference matrix bit by bit to obtain multiple difference vectors, and arrange them in chronological order to form a set of difference vectors;

[0024] The modal difference vector is obtained by averaging the difference vectors by row. The positions with a value of negative one in the modal difference vector are extracted to represent the modal acquisition behaviors that are expected to exist but are actually missing in the current cycle.

[0025] Preferably, S3 specifically includes the following steps:

[0026] S301. Based on the determined modal data gap state, extract the image data acquisition record at the current time point, parse the timestamp information in the image data acquisition record, align the current time point with the timestamp field in the image data acquisition record one by one, and generate the image acquisition identifier matrix at the current time point for use in the subsequent matching analysis process.

[0027] S302. Match and analyze the image acquisition identifier matrix at the current time point with the modal data gap vector at the current time point. Use the position index one-to-one comparison method to determine whether there is a cross-over relationship between the image acquisition status and the modal data missing flag. When the image acquisition status is valid and the corresponding modal data missing flag exists, it is identified as modal inconsistency between the image and the sensor in the same time point buffer.

[0028] S303. After identifying the modal inconsistency between the image and the sensor in the cache at the same time point, an identifier field for recording the inconsistency state is inserted into the cache data structure at the current time point. The identifier field records the image acquisition state and the corresponding modal data missing identifier in the form of key-value pairs, realizing the logical binding of the inconsistency mark content and the cache structure.

[0029] Preferably, S302 is as follows:

[0030] Align each column vector in the current time point image acquisition identifier matrix with the corresponding position in the current time point modal data gap vector, and construct a cross-matching matrix by column. Each column of the cross-matching matrix represents the combination result of the image acquisition status and the corresponding modal data missing marker.

[0031] Perform a conditional judgment operation on each column of the cross-matching matrix. When the image acquisition status is valid and the modal data missing flag is present, mark the column as a cross-over relationship and construct a cross-over flag sequence to represent the intersection of the image and the modal data gap.

[0032] The columns marked as having a cross-over relationship in the cross-over identifier sequence are identified. When there is a valid identifier in the cross-over identifier sequence, it is determined that the current time point is a modal inconsistency between the image and the sensor in the same time point cache.

[0033] Preferably, S4 is as follows:

[0034] Extract the acquisition status field of each modality from the marked inconsistent cached data content, count the inconsistency frequency of each modality data in the current sampling period, and combine the acquisition records of the same modality in multiple historical sampling periods to calculate the acquisition volatility of each modality under the same period length. After normalization by modality type, construct an acquisition volatility index table to quantify the acquisition stability of multimodal data in the current period.

[0035] Based on the mode type in the volatility index table, the preset credible weight allocation rule is invoked to assign a corresponding credible weight value to each mode. Then, the structural integrity risk score of the current sampling period is calculated using a weighted scoring method. The collected volatility and credible weight are multiplied element by element and summed to obtain the structural integrity risk score value of the current period, and a corresponding level of structural integrity risk score label is generated accordingly.

[0036] Based on the risk level threshold range represented by the structural integrity risk score label, the cached data in the current period is assigned to the complete encapsulation path, the defective warning encapsulation path, or the inconsistency warning encapsulation path, respectively. After the original cached data is encapsulated and bound with the structural integrity risk score label, it is output to the specified path, thus completing the differential graded encapsulation operation of the cached data in the offline state.

[0037] Preferably, S5 is as follows:

[0038] During the continuous operation of the cache cycle, the usage feedback content of the uploaded multimodal data at the central end is extracted. The feedback content includes the accuracy data of sensor temporary restart identification judgment, error records of modal data gap state judgment, and comparison results between modal inconsistency markers and actual differences. The feedback error vector set is formed by classifying and organizing the data according to timestamp and modal type.

[0039] The different modal error contents in the feedback error vector set are grouped according to the recognition type, and respectively generate the conditional update factor for recognizing whether the sensor has temporarily restarted, the rule adjustment factor for determining the state of the modal data gap, and the correction factor for marking the modal inconsistency logic. The three types of factors are assembled into a parameter update factor set after normalization encoding.

[0040] The parameter update factor set is written into the various judgment modules of the offline state data caching control logic in the water edge smart gateway. During the subsequent caching cycle, the updated identification conditions, state rules and marking logic are loaded in real time. Based on the characteristics of the cached data in the current cycle, adaptive adjustments are made to achieve dynamic control of the consistency of the multimodal data caching structure of the water edge smart gateway in the offline state.

[0041] The technical effects and advantages provided by the present invention in the above technical solution are as follows:

[0042] 1. This invention can accurately identify temporary sensor restarts caused by instantaneous voltage fluctuations during gateway offline operation. By constructing a synchronous sampling timeline and calculating the sampling interval variation rate, it effectively captures the acquisition fluctuation behavior of different modes within a continuous period. A modal acquisition reference matrix is ​​constructed using historical normal cycles, and compared bit-by-bit with the current cycle's acquisition results to accurately locate modal data gaps. This enables structured modeling of modal anomalies that are "expected but actually missing" in multimodal data. Simultaneously, the modal gap state is matched and analyzed with image acquisition records to identify modal inconsistencies between the image and the sensor at the same time point. Structured marking of these inconsistencies is achieved by inserting an identifier field, providing precise support for subsequent data encapsulation and difference management.

[0043] 2. This invention constructs a structural integrity risk scoring mechanism by combining acquisition volatility and modal reliability weights, and implements a differential hierarchical encapsulation strategy for cached data based on the scoring results. This effectively isolates structurally incomplete data and prevents it from being mistakenly transmitted to upstream processing modules. Furthermore, by classifying and processing the feedback information from uploaded data, it generates identification condition update factors, state rule adjustment factors, and logic correction factors, enabling adaptive updates to the modal anomaly identification logic. This dynamically regulates the cached structural consistency of the edge gateway in offline states. The entire technical solution possesses advantages such as accurate identification, clear labeling, flexible strategies, and continuous optimization, significantly improving the structural integrity assurance capability of multimodal data under offline conditions in edge computing scenarios and reducing the risk of backend misjudgments and system vulnerabilities caused by data inconsistency. Attached Figure Description

[0044] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.

[0045] Figure 1 This is a flowchart illustrating the efficient caching method for offline status data of a water affairs edge smart gateway based on multimodal data, as described in this invention. Detailed Implementation

[0046] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that the description of this disclosure will be more complete and fully convey the concept of the exemplary embodiments to those skilled in the art.

[0047] This invention provides, for example Figure 1 The method for efficient caching of offline status data of water edge smart gateways based on multimodal data, as shown, specifically includes the following steps:

[0048] S1. When the water edge smart gateway is offline, construct a synchronous sampling timeline map based on the time series of various sensors in the multimodal data, and identify whether the sensor has temporarily restarted by calculating the variability rate of the sampling interval of the continuous sampling period.

[0049] In this embodiment, S1 specifically refers to:

[0050] While the water edge smart gateway is offline, based on the time series data generated by various sensors in the offline state in the multimodal data, the sampling timestamps of each type of sensor in the continuous sampling period are extracted, a multi-channel sampling timestamp sequence set is generated and rearranged in chronological order;

[0051] While the water edge smart gateway is offline, data preprocessing can be performed on the time-series data generated by various sensors in the offline state within the multimodal data. This can be achieved by extracting timestamps from each type of sensor. Specifically, by defining the sampling period length, the timestamp field can be extracted from the raw data reported by each type of sensor within a continuous period, and a single-channel sampling timestamp sequence can be constructed according to sensor type. Each channel represents the timestamp trajectory of a modality of data, such as flow rate, residual chlorine, and temperature. Each channel contains a set of timestamp points arranged by time. To ensure consistency in subsequent alignment analysis, the timestamp sequences within each channel can be periodically normalized. For example, using a one-minute sampling granularity window, linear interpolation, forward padding, or zero padding can be used to standardize and complete the timestamp positions for non-equal interval data, ensuring that each channel has a sequence of equal length on the same time axis. Then, all single-channel timestamp sequences are concatenated and rearranged according to a unified timeline to form a multi-channel sampling timestamp sequence set with channel structure and time dimension. This set can be represented as a two-dimensional array, where rows represent time points and columns represent data sampling behavior trajectories of different modalities, serving as the basic input for subsequent construction of the synchronous sampling timeline map. The key to this process is to accurately extract the actual sampling time of each type of sensor, maintain consistency in the time dimension and independence between channels, and ensure the observability and analyzability of data synchronization behavior in offline mode.

[0052] A sampling time interval sequence is constructed based on the sampling timestamp sequence of each type of sensor. After length normalization of each sequence, the sequences are spliced ​​together by channel to construct a synchronous sampling timeline map. The map is indexed by channel and the sampling interval is the dimension.

[0053] Constructing a sampling time interval sequence based on the sampling timestamp sequence of each sensor type first involves calculating the difference between adjacent time points for the timestamp data of each sensor type arranged in chronological order to obtain the time interval sequence between every two consecutive samples. For example, if the sampling timestamps of a sensor are t1, t2, t3, then its time intervals are Δt1 = t2 - t1, Δt2 = t3 - t2, thus constructing a continuous time interval sequence. Since different sensors may have different numbers of sampling intervals within the same time period, the interval sequence of each sensor type needs to be normalized in length. Implementation methods include, but are not limited to, using fixed-length sliding window truncation, linear interpolation to fill missing intervals, repeated boundary value padding, or wavelet resampling techniques to ensure that the interval sequence length of all sensors is consistent. After normalization, channels are divided according to sensor type, with each sensor type corresponding to one channel. Finally, all normalized time interval sequences are concatenated according to channel index to construct a two-dimensional synchronous sampling timeline map. Each column of the atlas represents the standardized sampling behavior trajectory of a type of sensor. Each column contains the interval feature points of all sensors under a unified sampling period. This atlas provides a complete cross-sectional view of the sampling behavior of different sensors within the same offline period, which can be used for subsequent variability analysis and anomaly detection. The core of the entire process lies in the accuracy of time interval extraction, the rationality of the length normalization strategy, and the consistency of channel stitching, ensuring that the atlas has high comparability and high resolution in time-series behavior modeling.

[0054] Calculate the sampling interval variation rate of each type of sensor in the synchronous sampling timeline graph, compare the calculation result with the preset variation rate threshold, and identify the sensor as having temporarily restarted when the variation rate of any sensor exceeds the threshold.

[0055] To calculate the sampling interval variability of each type of sensor in a synchronous sampling timeline graph, a sliding analysis window can be used to extract the time interval set within each period of the standardized time interval sequence, and the degree of fluctuation within these interval sets can be calculated. Common implementation methods include statistically analyzing quantitative indicators reflecting volatility, such as variance, range, or maximum-minimum difference ratio, for each set of interval sequences, thereby obtaining the sampling stability of each type of sensor in different time periods. For example, in a graph with a one-minute period, if a sensor has intervals of 3 seconds, 2 seconds, and 5 seconds in the first period, its variability will be significantly higher than that of another set of sensors with intervals of 4 seconds, 4 seconds, and 4 seconds. This difference reflects the stability of the sampling behavior. To identify abnormal fluctuations, a set of standard variability threshold ranges needs to be established based on the interval variability when the sampling behavior is stable during historical operation phases. Each type of sensor can have an independent threshold setting to adapt to its inherent sampling frequency characteristics. When the variability calculated within a certain period exceeds the upper limit of this threshold, it indicates that the sensor has experienced significant sampling behavior disturbances during this period, usually caused by instantaneous voltage fluctuations or hardware restarts. Since sensors typically cannot accurately restore their sampling rhythm after a temporary restart, leading to significant jumps between adjacent intervals, identification based on exceeding the variability rate limit allows for the inference of restart behavior without relying on external device status monitoring. It also accurately locates potential modal data gaps in the offline cache structure, providing a basis for subsequent data consistency labeling. The preset variability rate threshold is generally determined through statistical analysis of long-term operational data, ensuring both discriminative power and fault tolerance, thus guaranteeing identification accuracy while avoiding misjudgments.

[0056] S2. When a temporary sensor restart is detected, a modal acquisition reference matrix is ​​constructed using the multimodal data structure of the historical sampling period. A modal difference vector is generated by combining the actual acquisition content of the current period to determine the modal data gap state under the temporary sensor restart situation.

[0057] In this embodiment, S2 specifically includes the following steps:

[0058] S201. When a temporary sensor restart is detected, select historical sampling periods within multiple normal acquisition phases, extract the multimodal data structures of various sensors in each period, construct a binary matrix based on whether the acquisition was successful, assign a value of one for successful acquisition and a value of zero for failed acquisition, arrange them to form a modal acquisition reference matrix, with columns representing sensor types and rows representing historical periods.

[0059] When a sensor temporarily restarts, the first step is to select time periods from multiple historical sampling periods where the acquisition behavior is stable and without anomalies as the historical sampling periods within the normal acquisition phase. Each sampling period corresponds to one complete data recording behavior. By extracting the acquisition results of various sensors from the multimodal data within each sampling period, a multimodal data structure with temporal order and modal classification characteristics is constructed. The multimodal data structure refers to the set of data collected by different types of sensors within each time period, such as residual chlorine concentration, dissolved oxygen, image frames, and flow rate. By determining whether each type of sensor successfully produces valid data in each sampling period, a logical flag is assigned to successful acquisition (1) and failed acquisition (0), thus constructing a binary matrix with acquisition status as the core. Each row of this binary matrix corresponds to a historical sampling period, each column corresponds to a specific sensor type, and each value in the matrix represents the actual acquisition status of the sensor in that period, which are then arranged to form a modal acquisition reference matrix. The purpose of constructing a modal acquisition reference matrix is ​​to establish a modal acquisition mode baseline based on normal conditions. This allows the system to identify modal data gaps that occur after a temporary sensor restart by comparing the deviation between the actual acquisition results of the current cycle and this reference baseline, thereby improving the system's ability to perceive and calibrate local anomalies.

[0060] S202. Extract the actual acquisition content of the current period, encode it into the current modal acquisition vector in the same format as the modal acquisition reference matrix, calculate the difference between the current modal acquisition vector and each row of the modal acquisition reference matrix bit by bit, and generate a modal difference vector. The position with a difference of negative one indicates the modal acquisition behavior that is expected to exist but is actually missing.

[0061] S203. Extract the position index of the element with a value of negative one in the modal difference vector, extract the sensor type corresponding to each position index, and form a set of sensor types that should have been collected but were not collected in the historical sampling mode in the current period. This set serves as the modal data gap state in the case of temporary sensor restart, and is used for modal inconsistency identification and cache data structure marking in subsequent processing.

[0062] In extracting elements with a value of negative one from the modal difference vector, the process first involves traversing all positions of the vector and recording the index position where the value equals negative one. Each index corresponds to a unique sensor type, and the index value corresponds one-to-one with the sensor's order. By establishing a mapping relationship between indices and sensor types, these indices can be accurately converted into specific sensor names or type identifiers. Furthermore, these sensor types are aggregated into a set representing data modalities that should have been acquired in the historical acquisition process but were not. This set represents the modal data gap state, reflecting the incompleteness of local modal data caused by temporary sensor restarts. This processing method is based on standardized data structures and unified encoding methods, ensuring the accuracy and consistency of missing location identification. The construction of this set provides clearly defined input conditions for subsequent modal inconsistency identification and cached data structure marking, enabling the caching mechanism to specifically address these data gaps, thereby avoiding structural misjudgments and information pollution. The entire process has a clear implementation path and well-defined logical dependencies, effectively enhancing the system's ability to identify and respond to unstructured data anomalies.

[0063] In this embodiment, S202 specifically refers to:

[0064] Extract the actual data collected in the current period, encode it according to the data collection success status of various sensors with one for successful collection and zero for failed collection, construct the current mode acquisition vector, and ensure that the vector length and arrangement order are consistent with the mode acquisition reference matrix;

[0065] In constructing the current modal acquisition vector, the first step is to extract all multimodal data acquisition records from the current period, including image frame data, water quality parameter data, flow velocity data, and other data acquired by all configured sensors. For each type of sensor, it is determined whether usable data was generated in the current period. If valid data exists, the acquisition is considered successful and assigned a value of one; if the corresponding data is empty, missing, or formatted incorrectly, the acquisition is considered a failure and assigned a value of zero. The acquisition status of all sensors is sequentially arranged into a fixed-length one-dimensional vector, which is the current modal acquisition vector. Each position in this vector corresponds to a sensor type, and its arrangement strictly follows the column order in the modal acquisition reference matrix to ensure structural consistency in subsequent comparisons. The purpose of constructing the current modal acquisition vector in this way is to structurally encode the current actual acquisition results, enabling bit-by-bit difference calculations with the acquisition patterns under historical normal periods to identify which modalities expected to have data were not actually acquired when sensors were temporarily restarted. This vector form allows for rapid logical judgment and difference localization, improving the detection efficiency of multimodal data cache structure consistency in offline states.

[0066] Subtract the current modal acquisition vector from the vector corresponding to each historical sampling period in the modal acquisition reference matrix bit by bit to obtain multiple difference vectors, and arrange them in chronological order to form a set of difference vectors;

[0067] When subtracting the current modal acquisition vector from the vector of each historical sampling period in the modal acquisition reference matrix element by element, it is first necessary to ensure that the dimension of the current modal acquisition vector is completely consistent with the dimension of each row in the reference matrix, that is, each position corresponds to the same sensor type and arrangement order. Then, the vector data of the historical periods are read row by row from the modal acquisition reference matrix, and element-wise subtraction is performed with the current modal acquisition vector to obtain a difference vector. For example, if a historical vector is [1,1,1,1] and the current vector is [1,0,1,1], then the difference vector is [0,-1,0,0]. This difference vector indicates that the second position (i.e., the second sensor type) is missing in the current period. Arranging the difference vectors corresponding to all historical periods in chronological order forms a set of difference vectors, which is used to capture and quantify the differences between the current period and historical periods in the multimodal data acquisition structure. This approach can intuitively reveal the structural manifestation of modal loss caused by temporary sensor restarts, and indicate the actual missing data modes by using positions with a difference of negative one, thus providing a clear basis for subsequent modal inconsistency identification and structural labeling. This method is not only computationally feasible but also highly robust in its structural alignment logic, effectively adapting to system configurations with different numbers and combinations of sensors.

[0068] The modal difference vector is obtained by averaging the difference vectors by row. The positions with a value of negative one in the modal difference vector are extracted to represent the modal acquisition behaviors that are expected to exist but are actually missing in the current cycle.

[0069] In the process of averaging the set of difference vectors row by row to generate the modal difference vector, the multiple difference vectors obtained in the previous stage are first arranged in chronological order to form a two-dimensional array. Each row represents the acquisition difference between a historical sampling period and the current period, and the columns represent the modal acquisition deviation values ​​corresponding to different sensors. For each column in this array, the arithmetic mean of all its rows is calculated to obtain a one-dimensional vector equal to the number of sensor types, i.e., the modal difference vector. Each element in this vector represents the average deviation of the sensor in terms of acquisition consistency compared to all historical periods in the current period. If the value at a certain position is negative one, it means that the sensor failed to acquire data in the current period, but successfully acquired data in all historical normal periods, representing an abnormal mode of "should have acquired data but did not". For example, if a sensor successfully acquired data in five historical periods, the column values ​​of its difference vector are all zero. When the acquisition fails in the current period, its corresponding difference value is negative one, and the average result is negative one. This method accurately extracts modal data that should have appeared in the current cycle but are actually missing based on historical data collection behavior, clearly identifying the specific location of the modal data gaps. This provides deterministic input for subsequent modal inconsistency identification and cached data structure labeling. This processing method avoids the fluctuations caused by a single historical cycle, possesses stability and interpretability, and is conducive to building more robust data consistency identification logic.

[0070] S3. Based on the determined modal data gap state, perform matching analysis between the image data acquisition record at the current time point and the modal data gap vector at the current time point to identify modal inconsistencies between the image and the sensor in the same time point cache, and mark the inconsistencies in the cached data structure by field insertion.

[0071] In this embodiment, S3 specifically includes the following steps:

[0072] S301. Based on the determined modal data gap state, extract the image data acquisition record at the current time point, parse the timestamp information in the image data acquisition record, align the current time point with the timestamp field in the image data acquisition record one by one, and generate the image acquisition identifier matrix at the current time point for use in the subsequent matching analysis process.

[0073] After identifying the modal data gap state, to achieve matching analysis between image data and modal missing states, it is first necessary to extract the image data acquisition records at the current time point and parse the timestamp information related to the acquisition behavior from the image records. Image data acquisition records are typically organized in a multi-dimensional array or log structure, with each record containing fields such as acquisition time, device number, and image status identifier. By precisely aligning the current time point with the timestamps in the image acquisition records using the timestamp field, it is possible to identify whether a valid image acquisition behavior exists at the current time point. Next, using sensor type as the index dimension, an image acquisition identifier matrix aligned with the modal data gap state is constructed. Each column of the matrix represents the image acquisition status corresponding to a sensor dimension, with one entered for successful acquisition and zero for failed acquisition. This image acquisition identifier matrix maintains consistency with the modal data gap vector in structure and arrangement, ensuring comparability and accuracy in subsequent cross-matching analysis. This construction method can structurally align asynchronously acquired image information to a unified time reference, providing basic data support for subsequent identification of modal inconsistencies between images and sensors, while ensuring that image modalities have a structured representation capability to participate in consistency analysis within the overall cache structure.

[0074] S302. Match and analyze the image acquisition identifier matrix at the current time point with the modal data gap vector at the current time point. Use the position index one-to-one comparison method to determine whether there is a cross-over relationship between the image acquisition status and the modal data missing flag. When the image acquisition status is valid and the corresponding modal data missing flag exists, it is identified as modal inconsistency between the image and the sensor in the same time point buffer.

[0075] S303. After identifying the modal inconsistency between the image and the sensor in the cache at the same time point, an identifier field for recording the inconsistency state is inserted into the cache data structure at the current time point. The identifier field records the image acquisition state and the corresponding modal data missing identifier in the form of key-value pairs, realizing the logical binding of the inconsistency mark content and the cache structure.

[0076] When modal inconsistencies between images and sensors cached at the same time point are identified, this abnormal state needs to be explicitly written into the cached data structure to ensure traceability and parsing integrity during subsequent uploading and processing. Specifically, a new identifier field is added to the data cache entry corresponding to the current time point. This identifier field is constructed in key-value pair format, where the key indicates the specific modal channel name or sensor type, and the value records the corresponding abnormal state. For example, image acquisition status can use "captured" or "missing," and modal data missing status can use "expected_missing" or a boolean value. The insertion process can be implemented by expanding the field list in the cache entry's metadata structure without affecting the main data carrier of the existing data structure. To achieve logical binding, a corresponding reference can be established between this identifier field and the timestamp field, image data field, and sensor data field, enabling the data reading module to quickly locate and interpret the inconsistency flag based on the time point. Furthermore, field insertion rules can be defined, such as triggering insertion only when an overlapping relationship is identified, to avoid meaningless markings interfering with the clarity of the data structure. This operation ensures that each time point of modal inconsistency is recorded in a structured manner, which helps downstream AI models filter out abnormal inputs and improves the reliability of water quality monitoring and decision-making reasoning.

[0077] In this embodiment, S302 specifically refers to:

[0078] Align each column vector in the current time point image acquisition identifier matrix with the corresponding position in the current time point modal data gap vector, and construct a cross-matching matrix by column. Each column of the cross-matching matrix represents the combination result of the image acquisition status and the corresponding modal data missing marker.

[0079] To identify the correspondence between image acquisition status and modal data gap markers, the first step is to precisely align each column vector in the current time point image acquisition identifier matrix with the corresponding position in the modal data gap vector. Each column in the image acquisition identifier matrix represents the image acquisition status of each sensor at the current time point, while each position in the modal data gap vector indicates whether the same sensor has missing data. When the index dimensions of the two structures are consistent, they can be combined by comparing each column one by one. That is, for each sensor position, the image acquisition status and its modal missing status are combined to form a tuple, which expresses the integrity status of the sensor at the current time point. All these tuples are concatenated column by column to form a cross-matching matrix, where each column reflects the acquisition consistency status of a sensor between image modalities and other modalities. This matrix maintains a one-to-one correspondence with the number of sensors, facilitating subsequent direct logical condition judgments. Constructing the cross-matching matrix in this way can integrate information from two different modal dimensions into a unified structure, enabling cross-modal features to quickly achieve anomaly detection and inconsistency identification through bit-to-bit structural comparison, avoiding the information ambiguity or redundancy problems in traditional global matching. This design enhances the structural clarity and algorithmic operability of the matching, providing an efficient and accurate foundation for intermodal difference identification.

[0080] Perform a conditional judgment operation on each column of the cross-matching matrix. When the image acquisition status is valid and the modal data missing flag is present, mark the column as a cross-over relationship and construct a cross-over flag sequence to represent the intersection of the image and the modal data gap.

[0081] To identify the intersection between image data and missing modal data, a column-by-column judgment operation needs to be performed on each column of the cross-matching matrix. Each column of the cross-matching matrix contains two flag values: an image acquisition status flag and a modal data missing flag. The image acquisition status flag indicates whether the sensor successfully acquired the image modality at the current time point, and the modal data missing flag indicates whether the sensor has data gaps in non-image modalities. The core logic of the conditional judgment operation is: when the image acquisition status flag is valid (i.e., a value of one) and the modal data missing flag is present (i.e., a value of negative one), an inconsistency between modalities can be considered to exist at that position. For each column judgment result, a bit is recorded as a Boolean value or integer encoding. The judgment results of all columns are then arranged sequentially to form a cross-over flag sequence. The cross-over flag sequence maintains the same column index as the cross-matching matrix in structure, so that each bit corresponds to a sensor channel, used to identify whether there is a cross-over situation where image acquisition was successful but other modal data is missing in that channel. The cross-over identifier sequence constructed in this way can not only quickly locate specific sensor channels with modal inconsistencies, but also has the ability to directly participate in subsequent data structure labeling and anomaly caching, significantly enhancing the granularity and accuracy of data integrity control.

[0082] The columns marked as having a cross-over relationship in the cross-over identifier sequence are identified. When there is a valid identifier in the cross-over identifier sequence, it is determined that the current time point is a modal inconsistency between the image and the sensor in the same time point cache.

[0083] To identify modal inconsistencies between images and sensor data at the same time point, a bit-by-bit scanning operation is first performed on each column of the cross-oversignature sequence. The cross-oversignature sequence consists of multiple flag bits, each corresponding to a specific sensor channel. The value of the flag bit indicates whether there is an overlap between successful image acquisition and missing non-image modal data in that channel. When at least one flag bit is detected as a valid identifier (usually represented by a Boolean truth value or an integer), modal inconsistency is determined to exist at that time point. This judgment logic is based on the contradictory characteristic of "image presence while other modalities are missing," revealing hidden temporal mismatches at the data structure level. To improve recognition efficiency, the cross-oversignature sequence can be input into logic or an aggregation judgment function to quickly confirm the existence of valid identifiers. This recognition method not only has real-time processing capabilities but also adapts to dynamic changes in the number of channels, thereby ensuring that the water edge smart gateway can accurately identify modal inconsistencies offline, significantly improving the integrity and reliability of the data cache structure.

[0084] S4. Based on the marked inconsistent cached data content, and combined with the collection volatility and credibility weight of multimodal data in this period, construct the structural integrity risk score result, and divide the cached data into differential graded encapsulation strategy paths according to the score result.

[0085] In this embodiment, S4 specifically refers to:

[0086] Extract the acquisition status field of each modality from the marked inconsistent cached data content, count the inconsistency frequency of each modality data in the current sampling period, and combine the acquisition records of the same modality in multiple historical sampling periods to calculate the acquisition volatility of each modality under the same period length. After normalization by modality type, construct an acquisition volatility index table to quantify the acquisition stability of multimodal data in the current period.

[0087] To quantify the structural integrity risk of multimodal data during the offline caching stage, it is necessary to first extract the acquisition status field for each modality from the cached data marked as having modal inconsistencies. The acquisition status field is typically represented by two values, where "1" represents successful acquisition and "0" represents acquisition failure. The number of times the acquisition status for each modality is "0" in the current sampling period is counted as the inconsistency frequency for that modality in that period. Subsequently, data acquisition records for the same modality from multiple historical sampling periods are retrieved to construct a modality acquisition history sequence. The number of failures in each period is calculated on a per-sampling-period basis, and the acquisition volatility of the current modality over the same period length is calculated based on standard deviation or variance. After normalization, the volatility values ​​of all modalities are compiled into an acquisition volatility index table categorized by modality type. This index table is used to quantify the differences in acquisition stability for each modality within the current period, providing foundational data for subsequent reliability weight calculation and risk scoring. For example, if a temperature sensor fails to acquire data three times in a historical 10-cycle period and fails again in the current cycle, the volatility of that mode will be high, reflecting its instability.

[0088] The acquisition status field is a data unit indicating whether data acquisition was successful or not, used to describe the operational results of each modality within a sampling period. This field quantifies the performance of a modality over different time periods. The inconsistency frequency within the sampling period refers to the number of times a particular modality failed to acquire data in the current cache window, reflecting the degree of abnormality of that modality at the current stage. Acquisition volatility is a metric based on historical data statistics, used to judge the stability and frequency of anomalies in data acquisition for a particular modality. Normalization is used to compare the volatility of different modalities on the same scale, making it more suitable for constructing a unified risk scoring index. The acquisition volatility index table is a modality-oriented data structure used to store the standardized volatility value of each modality, providing a stability basis for subsequent structural integrity risk assessment. Through the combination of these technical features, not only can the acquisition reliability of each modality be dynamically perceived, but a data support foundation can also be laid for the hierarchical encapsulation of cached data.

[0089] Based on the mode type in the volatility index table, the preset credible weight allocation rule is invoked to assign a corresponding credible weight value to each mode. Then, the structural integrity risk score of the current sampling period is calculated using a weighted scoring method. The collected volatility and credible weight are multiplied element by element and summed to obtain the structural integrity risk score value of the current period, and a corresponding level of structural integrity risk score label is generated accordingly.

[0090] To further quantify the structural integrity risk of cached data within the current sampling period, a pre-defined trusted weight allocation rule is invoked item by item according to modality type, based on the acquisition volatility index table. The trusted weight allocation rule is a modality priority list constructed based on empirical knowledge or historical model performance, reflecting the decision contribution of each modality in water quality monitoring. Each modality is assigned a fixed trusted weight value; for example, image mode weight is 0.4, temperature mode weight is 0.2, pH mode weight is 0.3, etc. Then, each value in the acquisition volatility index table is multiplied element-wise with the corresponding modality's trusted weight, and all products are summed to obtain the structural integrity risk score for the current sampling period. A higher score indicates a greater risk of data structure incompleteness. Finally, based on the numerical range of the score, a structural integrity risk label is generated, for example, divided into three levels: "low risk," "medium risk," and "high risk," to guide the priority allocation and processing strategy selection of cached data in subsequent encapsulation paths. For example, when the structural integrity risk score is greater than 0.7, it is marked as "high risk" and the system will implement a conservative encapsulation strategy.

[0091] The acquisition volatility index table is a multimodal acquisition performance quantification structure. Its core is to convert the acquisition stability of each modality within the current period into a standardized numerical representation. Modality types are used to index these values ​​and serve as the mapping entry point for weight allocation rules. The trusted weight allocation rules are a rule base determined by expert experience, model importance, or application scenario sensitivity. It contains each modality type and its corresponding trusted weight value, reflecting the trustworthiness of that modality in structural integrity assessment. The weighted scoring method is a fusion strategy combining stability and trustworthiness. It integrates acquisition volatility and trusted weights into a single score value through weighted summation to measure the overall integrity of the data structure. The structural integrity risk score is a real number reflecting the overall trustworthiness level of the cached data within the current period. The structural integrity risk score label is a classification identifier, facilitating rapid identification and processing of risk levels. It is typically designed with multiple level ranges, dynamically assigned based on the score value. This logic enables the caching strategy to respond with fine-grained precision based on structural risk.

[0092] Based on the risk level threshold range represented by the structural integrity risk score label, the cached data in the current period is assigned to the complete encapsulation path, the defective warning encapsulation path, or the inconsistency warning encapsulation path, respectively. After the original cached data is encapsulated and bound with the structural integrity risk score label, it is output to the specified path, thus completing the differential graded encapsulation operation of the cached data in the offline state.

[0093] Structural integrity risk scoring labels are tags used to indicate the risk level of current cached data in terms of structural integrity. Based on the risk level threshold range to which the label belongs, cached data within the current sampling period can be automatically classified into three encapsulation paths: complete encapsulation path, defect warning encapsulation path, or inconsistency warning encapsulation path. Complete encapsulation paths are used to cache data with complete structure and good modal consistency; defect warning encapsulation paths are used to cache medium-risk data with minor modal gaps but where the image and overall modal structure still have some consistency; and inconsistency warning encapsulation paths are used to cache high-risk data with clear intersections between the image and modal gaps. After classification, the original cached data is encapsulated and bound with the structural integrity risk scoring labels. This is done by adding a risk label field to the cached data structure, recording the risk level and encapsulation type in key-value pairs, forming the encapsulated data structure, and then outputting it to the corresponding encapsulation path directory. For example, if the risk scoring label for a certain cache period is "medium risk," the data will be output to the defect warning encapsulation path, and the identifier "Label: Medium Risk, Path: Defect Warning" will be inserted into its structure for differentiated processing during subsequent uploads or applications.

[0094] Structural integrity risk scoring labels are structural quality assessment identifiers expressed in text or coded form, with clear risk level boundaries. For example, they are divided into three level ranges: 0.0–0.3, 0.3–0.7, and 0.7–1.0, corresponding to low, medium, and high risk levels, respectively. Risk level threshold ranges are criteria used to determine the risk level of the scoring label, typically set through configuration files or system parameters, and support custom adjustments. Complete encapsulation paths, missing data indication encapsulation paths, and inconsistency warning encapsulation paths are three output paths used to carry cached data of different risk levels, usually distinguished by directory structure or logical identifiers. Encapsulation binding is a structural enhancement strategy that aims to explicitly mark the integrity status of data in a given period within the data cache structure, enabling rapid identification and differentiated processing during subsequent uploads, reviews, or intelligent processing. After encapsulation, the data structure retains the original content while adding structural label fields, possessing self-descriptive properties, which helps ensure consistent structural management and risk control in offline caching.

[0095] S5. During the continuous operation of the cache cycle, the parameter update factor is generated based on the uploaded data and the feedback is used to adaptively adjust the conditions for identifying whether a sensor has temporarily restarted, the rules for determining the state of the modal data gap, and the logic for marking modal inconsistencies, so as to realize the consistent dynamic control of the multimodal data cache structure of the water edge smart gateway in the offline state.

[0096] In this embodiment, S5 specifically refers to:

[0097] During the continuous operation of the cache cycle, the usage feedback content of the uploaded multimodal data at the central end is extracted. The feedback content includes the accuracy data of sensor temporary restart identification judgment, error records of modal data gap state judgment, and comparison results between modal inconsistency markers and actual differences. The feedback error vector set is formed by classifying and organizing the data according to timestamp and modal type.

[0098] During the continuous operation of the cache cycle, the processing results of multimodal data can be continuously backtracked and compared using the usage records after the data is uploaded to the central endpoint. Specifically, a comparison engine for analyzing data consistency and integrity is built at the central endpoint. This engine automatically parses the cached data for each upload cycle and compares three key indicators: first, the matching accuracy between the sensor temporary restart identification and the actual fault log; second, the gap coverage between the modal data gap state judgment result and the fully restored data; and third, the difference deviation between the modal inconsistency marker and the final data quality indicators used for business processing. These three comparison results are extracted as error samples and, based on the data collection timestamp and modal type, are sequentially organized into a vector structure. This constructs a set of feedback error vectors containing cycle information, modal dimensions, and difference indicators, which are then used to generate parameter update factors.

[0099] Each set of vectors in the feedback error vector set is based on a single sampling period and contains multiple modal data dimensions. Each dimension corresponds to a specific sensor or image modality, and its value reflects the magnitude of the system's deviation in the accuracy of its judgment of that modal data structure within the current period. For example, for a sensor identified as "temporarily restarted" at a specific time point, if its uploaded complete log shows that the acquisition was not interrupted, the corresponding vector value will be recorded as the recognition error. If an image frame is inconsistent with multiple sensor modalities in the current period but is not marked, this modal difference will be converted into a marking accuracy deviation. All error vectors are indexed by period number and modal identifier to form a two-dimensional structured data table, providing an input basis for subsequent parameter adjustments. It can also be used for cumulative analysis of recognition trend shifts and model adaptive requirements during multi-period continuous operation.

[0100] The different modal error contents in the feedback error vector set are grouped according to the recognition type, and respectively generate the conditional update factor for recognizing whether the sensor has temporarily restarted, the rule adjustment factor for determining the state of the modal data gap, and the correction factor for marking the modal inconsistency logic. The three types of factors are assembled into a parameter update factor set after normalization encoding.

[0101] After the feedback error vector set is constructed, it can be structurally grouped according to the different recognition types of the error sources. First, each feedback error record is classified according to its labeled recognition type, into three groups: sensor temporary restart recognition error, modal data gap judgment error, and modal inconsistency labeling error. Within each group, the average error rate and maximum deviation value of each modality under that category are calculated, and weighting factors are generated based on the corresponding sampling period span. This leads to three types of update parameters: a conditional update factor for adjusting the sensor temporary restart condition threshold, a rule adjustment factor for optimizing the modal data gap judgment rule, and a logical correction factor for correcting the modal inconsistency judgment logic threshold. By standardizing the numerical range of each factor to ensure comparability at the same parameter scale, the three sub-factors are finally combined using modal category and recognition dimension as index fields to form a complete parameter update factor set.

[0102] The identification type grouping operation uses the "identification dimension" field of each record in the error vector set as the grouping basis. For example, a record identified as "sensor temporary restart misjudgment" has a corresponding modality type of temperature sensor and an error value of 0.7, so this record is included in the temperature channel statistics under the sensor restart identification error group. Similarly, inconsistencies between the image and the water quality sensor that were not identified are classified into the modality inconsistency labeling error group. After grouping, each error vector is used to calculate the error trend in the current period using a moving average or exponential decay function, and then normalized to the parameter range according to the set convergence interval. For example, the error value of 0.7 is mapped to a normalization coefficient of 0.7 within the maximum possible error of 1.0, which is used as the update factor coefficient of the modality under the current identification conditions. The final parameter update factor set is a three-dimensional structure containing modality type, identification dimension, and normalization factor value, used to drive the adaptive strategy update of the model in the next cache cycle.

[0103] The parameter update factor set is written into the various judgment modules of the offline state data caching control logic in the water edge smart gateway. During the subsequent caching cycle, the updated identification conditions, state rules and marking logic are loaded in real time. Based on the characteristics of the cached data in the current cycle, adaptive adjustments are made to achieve dynamic control of the consistency of the multimodal data caching structure of the water edge smart gateway in the offline state.

[0104] When applying the parameter update factor set to the execution logic of a water edge smart gateway, the various identification conditions, judgment rules, and marking logic update parameters in this set need to be allocated and written into each judgment module in the edge gateway that executes the offline state data caching control logic. The specific operation process is as follows: Parameter loading interfaces are reserved in various judgment modules within the gateway. After each caching cycle completes a data upload and feedback analysis, the parameter update factor set generated by the central end based on the feedback error is written into the gateway memory via a remote configuration channel or cache synchronization mechanism. When the judgment module starts the caching logic for the next cycle, it loads the updated sensor restart identification threshold, modal data gap state judgment weight, and modal inconsistency marking logic from this set in real time. The new parameters are then used for decision-making in the sampling synchronization, structural comparison, and marker insertion stages, thereby dynamically adjusting the judgment strategy based on the operating characteristics of the current caching cycle.

[0105] Each parameter update factor undergoes type matching and module binding before being written to the gateway. For example, the update factor for identifying whether a sensor has temporarily restarted is mapped to the sensor sampling time interval analysis module to replace the original sampling interval variation rate threshold; the modal data gap state rule adjustment factor is used to control the threshold judgment logic in the reference matrix comparison strategy; and the modal inconsistency logic correction factor is connected to the image and sensor matching and comparison module to update the recognition conditions for cross-over relationships. The gateway uses a periodic module re-initialization mechanism to ensure that the judgment logic in each running cycle loads the latest version of the parameter settings. This allows it to automatically adapt and optimize the cache structure generation path when facing different data acquisition stability or abnormal interference conditions, improving the edge cache's ability to maintain multimodal data consistency and its discrimination accuracy in offline states. This dynamic adjustment mechanism shifts the cache logic from a fixed-condition mode to a self-optimizing operation mode driven by historical feedback.

[0106] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions according to the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless (e.g., infrared, wireless, microwave, etc.) means. A computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. Available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media. Semiconductor media can be solid-state drives.

[0107] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0108] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0109] In the several embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0110] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0111] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0112] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for efficient caching of off-line state data of water affairs edge intelligent gateway based on multi-modal data, characterized by, Specifically comprising the following steps: S1, during the offline state of the water edge intelligent gateway, a synchronous sampling timeline atlas is constructed based on the time series of various sensors in the multi-modal data, and whether a temporary sensor restart occurs is identified by calculating the sampling interval variation rate of the continuous sampling period; S2, in the case of identifying the temporary sensor restart, a modal acquisition reference matrix is constructed using the multi-modal data structure of the historical sampling period, and a modal difference vector is generated by combining the actual acquisition content of the current period, which is used to determine the modal data gap state under the temporary sensor restart condition; S2 specifically comprises the following steps: S201, in the case of identifying the temporary sensor restart, a plurality of historical sampling periods in the normal acquisition stage are selected, the multi-modal data structure of each type of sensor in each period is extracted, a binary matrix is constructed based on whether the acquisition is successful, the acquisition success is assigned to one, and the acquisition failure is assigned to zero, and the matrix is arranged to form a modal acquisition reference matrix, the list indicates the sensor type, and the row indicates the historical period; S202, the actual acquisition content of the current period is extracted, and the same format as the modal acquisition reference matrix is encoded into the current modal acquisition vector, and the current modal acquisition vector and the modal acquisition reference matrix are calculated by bit difference, and the modal difference vector is generated, and the difference value of negative one indicates that the modal acquisition behavior is expected to exist but actually missing; S203, the position index of the element with a value of negative one in the modal difference vector in the vector is extracted, and each sensor type corresponding to each position index is extracted to form a sensor type set that should be acquired but not acquired in the historical sampling mode in the current period, which is used as the modal data gap state under the temporary sensor restart condition for subsequent processing of modal inconsistency identification and cache data structure marking; S3, based on the determined modal data gap state, the image data acquisition record at the current time point is matched and analyzed with the modal data gap vector at the current time point, the modal inconsistency of the image and the sensor in the cache at the same time point is identified, and the inconsistency of the cache data structure is marked by field insertion; S4, according to the marked inconsistent cache data content, the acquisition fluctuation rate and the trusted weight of the multi-modal data in the period are combined to construct a structural integrity risk score result, and the cache data is divided into a difference classification packaging strategy path according to the score result; S5, during the continuous operation of the cache period, the feedback generated parameter update factor is used based on the uploaded data to adaptively adjust the conditions for identifying whether a temporary sensor restart occurs, the rules for determining the modal data gap state, and the logic for marking the modal inconsistency, so as to realize the consistency dynamic regulation and control of the multi-modal data cache structure under the offline state of the water edge intelligent gateway.

2. The method of claim 1, wherein, S1 specifically is: During the offline state of the water edge intelligent gateway, the time series data generated by various sensors in the multi-modal data under the offline state is extracted, the sampling time stamp of each type of sensor in the continuous sampling period is generated, a multi-channel sampling time stamp sequence set is generated, and the sequence is rearranged in chronological order; A sampling time interval sequence is constructed according to a sampling time stamp sequence of each type of sensor, and after length normalization of each sequence, a synchronous sampling time line atlas is constructed by channel splicing, the atlas taking channels as indexes and sampling intervals as dimensions; A sampling interval variation rate of a continuous sampling period of each type of sensor in the synchronous sampling time line atlas is calculated, and the calculation result is compared with a preset variation rate threshold value, and when the variation rate of any sensor exceeds the threshold value, it is identified that the sensor temporarily restarts.

3. The method of claim 1, wherein, S202 specifically is: Actual collection contents of the current period are extracted, and are encoded according to the collection success state of each type of sensor according to a rule that one is collection success and zero is collection failure, a current modal collection vector is constructed, and it is ensured that the vector length and arrangement order are consistent with the modal collection reference matrix; The current modal collection vector is subtracted from each vector corresponding to each historical sampling period in the modal collection reference matrix bit by bit, a plurality of difference vectors are obtained, and the difference vectors are arranged in time sequence as a difference vector set; The difference vector set is averaged by row to obtain a modal difference vector, and a position where the value of the modal difference vector is minus one is extracted, indicating that there is an expected but actually missing modal collection behavior in the current period.

4. The method of claim 1, wherein, S3 specifically includes the following steps: S301, based on the determined modal data gap state, extracting the image data collection record of the current time point, analyzing the timestamp information in the image data collection record, aligning the current time point with the timestamp field in the image data collection record one by one, generating a current time point image collection identification matrix, which is used to participate in the subsequent matching analysis process; S302, matching the current time point image collection identification matrix with the modal data gap vector of the current time point, using position index one-to-one comparison to determine whether the image collection state and the modal data missing flag exist in the cross-overlapping relationship, when the image collection state is valid and the corresponding modal data missing flag is present, it is identified that the image and the sensor have modal inconsistency in the same time point cache; S303, after identifying that the image and the sensor have modal inconsistency in the same time point cache, inserting an identification field for recording the inconsistency state into the current time point cache data structure, the identification field records the image collection state and the corresponding modal data missing flag in the form of key-value pair, realizing the logical binding of the inconsistency marking content and the cache structure.

5. The method of claim 4, wherein, S302 specifically is: Each column vector in the current time point image collection identification matrix is aligned with the corresponding position in the modal data gap vector of the current time point one by one, a cross-matching matrix is constructed by column, and each column in the cross-matching matrix represents the combination result of the image collection state and the corresponding modal data missing flag; Conditional judgment operation is performed on each column of the cross-matching matrix, when the image collection state is a valid identification and the modal data missing flag is an existing identification, the column is marked as a cross-overlapping relationship, a cross-overlapping identification sequence is constructed, indicating the intersection of the image and the modal data gap; Identify the column marked as the intersection relationship in the intersection identification sequence, and when there is a valid identification in the intersection identification sequence, determine that the current time point is inconsistent in the modalities of the image and the sensor in the same time point cache.

6. The method of claim 1, wherein, S4 specifically is: Extract the acquisition state field of each type of modality from the marked inconsistent cache data content, count the inconsistency frequency of each type of modality data in the current sampling period, and combine the acquisition records of the same type of modality in the historical multiple sampling periods to calculate the acquisition fluctuation rate of each type of modality under the same cycle length. Normalize by modality type to construct an acquisition fluctuation rate index table to quantify the acquisition stability of multi-modality data in the current period. According to the modality type in the acquisition fluctuation rate index table, call the preset trusted weight allocation rule to allocate a corresponding trusted weight value to each type of modality, and then calculate the structural integrity risk score of the current sampling period using a weighted scoring method. Multiply and sum the acquisition fluctuation rate and the trusted weight corresponding to the element to obtain the structural integrity risk score value of the current period, and generate a structural integrity risk score label of the corresponding grade accordingly. According to the risk level threshold interval represented by the structural integrity risk score label, the cache data in the current period is classified into complete encapsulation path, defect prompt encapsulation path or inconsistency warning encapsulation path. The original cache data and the structural integrity risk score label are encapsulated and bound and then output to the specified path to complete the differential classification and encapsulation operation of the cache data in the offline state.

7. The method of claim 1, wherein, S5 specifically is: During the continuous operation of the cache period, extract the usage feedback content of the uploaded multi-modality data at the center end. The feedback content includes the accuracy data of the sensor temporary restart identification judgment, the error record of the modality data gap state determination, and the comparison result between the modality inconsistency mark and the actual difference. According to the timestamp and modality type, classify and organize to form a feedback error vector set; Group different modality error contents in the feedback error vector set according to the identification type, respectively generate condition update factors for identifying whether a sensor temporary restart occurs, rule adjustment factors for determining the modality data gap state, and correction factors for marking the modality inconsistency logic. After normalization coding, the three types of factors are assembled into a parameter update factor set. Write the parameter update factor set into each judgment module of the water service edge intelligent gateway that executes the offline state data cache control logic, and load the updated identification conditions, state rules and marking logic in real time during the subsequent cache period operation. According to the cache data characteristics in the current period, adaptively adjust to realize dynamic regulation and control of the multi-modality data cache structure consistency of the water service edge intelligent gateway in the offline state.

Citation Information

Patent Citations

  • Intelligent remote control and data synchronization method and system for four-column test bed

    CN120029047A

  • Intelligent power supply data sharing system based on cloud chain collaboration

    CN120301943A