Self-adaptive backtracking window calculation obtaining method and device and storage medium

By acquiring the multicast cycle and module failure coefficient of time-series data in the industrial monitoring system and adjusting the backtracking window duration, the problem of data inconsistency across different time spans was solved, enabling unified sampling and querying of data in the industrial monitoring system.

CN121579261APending Publication Date: 2026-02-27HANGZHOU KANGJISEN AUTOMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511819025.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-04
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

In the field of industrial monitoring, the sampling rules for different time spans in existing time-series data queries are inconsistent, resulting in deviations in the data of the same physical moment in different span trend charts, which can easily lead to maintenance personnel misjudging the severity of the fault.

Method used

By obtaining the multicast period of the time series data to be queried, the module failure coefficient and quality correction factor are determined based on the module type and historical data quality, and the backtracking window duration is adjusted to achieve unified sampling backtracking.

Benefits of technology

The sampling backtracking window was standardized across different time spans, which solved the problem of data redundancy or missing data caused by the lack of consideration for module differences in the fixed window, and ensured data consistency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121579261A_ABST
    Figure CN121579261A_ABST
Patent Text Reader

Abstract

According to the adaptive backtracking window calculation obtaining method and device and the storage medium, the module fault coefficient is determined by obtaining the multicast period of the to-be-queried time series data and based on the module type where the to-be-queried time series data is located and the historical data quality of the module; and correcting the multicast period of the current to-be-queried time series data by using the quality correction factor and the module fault coefficient to obtain an initial window duration, and finally, adjusting the initial window duration according to a set adjustment rule to obtain a final backtracking window duration. Therefore, a uniform sampling backtracking window under different spans is provided to standardize sampling access, and meanwhile, the problem that the data updating frequency and the fault characteristic difference of different modules in an industrial scene are not considered in a fixed window due to the fact that access is performed directly through a preset fixed backtracking window traditionally is solved. Data redundancy of a high-frequency module and data missing of a low-frequency module are easily caused, and multi-module data query solvability cannot be considered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to an adaptive backtracking window calculation and acquisition method, apparatus, and storage medium. Background Technology

[0002] In the field of industrial monitoring, platforms such as DCS and SCADA rely on trend charts to display time-series data. Users often switch between different time spans, such as 1 hour or 1 day, to view the same indicator, ensuring data consistency at the same physical moment for analysis such as fault backtracking. However, in existing time-series data queries, different time spans often use independent sampling and aggregation rules. For example, short time spans may directly use raw data, while long time spans use aggregation calculations such as interval averages, maximum values, or minimum values. These independent rules result in data at the same physical moment being assigned to different sampling interval windows or processed by different logic calculations under different spans, directly causing deviations in the data values ​​at that moment in the trend charts of different spans. For example, during equipment fault backtracking, a short-span trend chart may show that the vibration value at a certain moment is normal, while a long-span trend chart may show that the value at that moment exceeds the standard, which can easily lead to maintenance personnel misjudging the severity of the fault. Therefore, there is an urgent need for a unified sampling backtracking window across different spans to standardize data sampling. Summary of the Invention

[0003] This invention addresses the shortcomings of existing technologies by providing an adaptive backtracking window duration acquisition method, comprising the following steps: Obtain the multicast period of the time-series data to be queried, where the multicast period is the original update period of the time-series data in the module; Based on the module type of the time series data to be queried and the historical data quality of that module, the module failure coefficient is determined, and the module failure coefficient is adapted to the module failure characteristics; a quality correction factor is determined based on the effective data density of the module in a preset historical period. The initial window duration is obtained by correcting the multicast period of the current time series data to be queried using the quality correction factor and module failure coefficient. The final backtracking window duration is obtained by adjusting the initial window duration according to the set adjustment rules.

[0004] Preferably, the original update cycle of the time-series data in the module is the basic variable data update cycle of the distributed control system preset in the industrial monitoring system, or the data acquisition update cycle pre-configured and adjusted by each module according to the current application scenario.

[0005] Preferably, the module failure coefficient is determined based on the module type where the time-series data to be queried resides and the historical data quality of that module, specifically including: Obtain the module type for collecting the time series data to be queried, and query the corresponding module basic coefficients based on the module type; Extract the historical data quality stamp of the module within a preset historical period interval, obtain the fault duration within the preset historical period interval based on the historical data quality stamp, and obtain the fault impact coefficient based on the proportion of the fault duration within the historical period interval. The module fault coefficient of the current module is determined based on the module's basic coefficient and fault impact coefficient.

[0006] Preferably, the module's basic coefficients are pre-configured based on the update characteristics and stability of the time-series data collected by the module.

[0007] Preferably, the historical data quality stamp is used to identify the quality status and fault type of each historical data. The quality status includes valid status and fault status, and the fault type includes, but is not limited to, controller disconnection and network disconnection.

[0008] Preferably, the quality correction factor is determined based on the effective data density of the module within a preset historical period, specifically including: The effective data ratio is obtained based on the effective state data volume and the total data volume within a preset historical period interval. A quality correction factor is calculated based on the effective data ratio to correct the backtracking window. The quality correction factor is configured to correspond to the effective data ratio and increases as the effective data ratio decreases, and is used to increase the backtracking window.

[0009] Preferably, the step of correcting the multicast period of the current time-series data to be queried using the quality correction factor and module failure coefficient to obtain the initial window duration, and then adjusting the initial window duration according to the set adjustment rules to obtain the final backtracking window duration specifically includes: Calculate the initial window duration W0, where W0 = multicast period T * module failure coefficient K * quality correction factor β, and round the initial window duration W0 to obtain the intermediate window duration W1. Determine whether the intermediate window duration W1 is within the set duration range. If the duration of the intermediate window is within the set duration range, the duration of the intermediate window is used as the final backtracking window duration; if the duration of the intermediate window is less than the set duration range, the preset minimum window duration is obtained as the final backtracking window duration; if the duration of the intermediate window is greater than the set duration range, the preset maximum window duration is obtained as the final backtracking window duration.

[0010] This invention also discloses an adaptive backtracking window duration acquisition device, comprising: a multicast cycle query module, used to acquire the multicast cycle of the time-series data to be queried, wherein the multicast cycle is the original update cycle of the time-series data in the module; a modified data acquisition module, used to determine the module failure coefficient based on the module type of the time-series data to be queried and the historical data quality of the module, wherein the module failure coefficient is adapted to the module failure characteristics; and a quality correction factor determined according to the effective data density in the module in a preset historical cycle; and a backtracking window duration calculation module, used to correct the multicast cycle of the current time-series data to be queried using the quality correction factor and the module failure coefficient to obtain an initial window duration, and to adjust the initial window duration according to a set adjustment rule to obtain the final backtracking window duration.

[0011] The present invention also discloses an adaptive backtracking window duration acquisition system, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any of the methods described above.

[0012] The present invention also discloses a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the methods described above.

[0013] This invention discloses an adaptive backtracking window calculation and acquisition method, apparatus, and storage medium. It acquires the multicast period of the time-series data to be queried, determines the module fault coefficient based on the module type of the time-series data and the historical data quality of that module, and determines a quality correction factor based on the effective data density of the module in a preset historical period. After correcting the multicast period of the current time-series data using the quality correction factor and the module fault coefficient, an initial window duration is obtained. Finally, the initial window duration is adjusted according to a set adjustment rule to obtain the final backtracking window duration. This provides a unified sampling backtracking window across different spans to standardize data sampling. It also solves the problem of traditional methods that directly retrieve data through a pre-set fixed backtracking window, which fails to consider the differences in data update frequency and fault characteristics of different modules in industrial scenarios, easily leading to data redundancy in high-frequency modules and data loss in low-frequency modules, and failing to ensure data availability across multiple modules.

[0014] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0015] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings: Figure 1 This is a schematic diagram illustrating the steps of an adaptive backtracking window duration acquisition method disclosed in an embodiment of the present invention.

[0016] Figure 2 This is a schematic diagram illustrating the steps for determining the module failure coefficient according to an embodiment of the present invention.

[0017] Figure 3 This is a schematic diagram of the adaptive backtracking window duration acquisition device disclosed in another embodiment of the present invention. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0019] Unless otherwise defined, the technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains. The terms “first,” “second,” and similar terms used in the specification and claims of this patent application do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, the terms “an” or “a” and similar terms do not indicate a limitation of quantity, but rather indicate the presence of at least one.

[0020] In this embodiment, as shown in the appendix Figure 1 As shown, an adaptive backtracking window duration acquisition method is disclosed, which includes the following:

[0021] Step S1: Obtain the multicast period of the time-series data to be queried. The multicast period is the original update period of the time-series data in the module. Specifically, the original update period of the time-series data in the module is either the pre-set update period of the basic variable data of the distributed control system in the industrial monitoring system, or the data acquisition update period pre-configured and adjusted by each module according to the current application scenario.

[0022] Specifically, the initial update cycle of time-series data within the module can be determined by considering the architecture design of the industrial monitoring system and the actual application scenarios of the module. For the basic variable data of the distributed control system in the industrial monitoring system, the initial update cycle can be set during the system deployment phase. Based on the industry standards of the distributed control system, the monitoring accuracy requirements of the basic monitoring indicators, and the overall operating load of the system, technicians will pre-define the update cycle of such variables in the basic configuration module of the system and associate and store this cycle parameter with the identification information of the basic variables. Subsequent updates of such variables in the module will strictly follow this preset cycle without any additional adjustments. For other functional modules, such as those undertaking third-party data collection tasks or those targeting specific process steps, the initial update cycle can be set by the maintenance personnel through the system's module configuration interface, taking into account the specific requirements of the current application scenario. This configuration is based on the type of data collected by the module, the frequency of dynamic changes in the monitored objects, and the real-time requirements of the on-site business. If the application scenario changes subsequently, such as adjustments to the operating status of the monitored objects or changes in the required data accuracy, the maintenance personnel can access the module's parameter settings page again through the configuration interface to readjust the original update cycle, ensuring that the cycle is compatible with the module's current operating scenario.

[0023] Specifically, the multicast period T is the original update period of the time-series data, which is a default value preset in the industrial monitoring system. It can be adjusted according to the actual scenario. For simple DCS variables such as temperature and pressure sensor direct data, the default multicast period T = 1 second. The multicast period of other modules is preset according to the actual application scenario and can be adjusted.

[0024] Step S2: Determine the module failure coefficient based on the module type of the time series data to be queried and the historical data quality of the module. The module failure coefficient is adapted to the module failure characteristics. Determine the quality correction factor based on the effective data density of the module in the preset historical period.

[0025] In this embodiment, when determining the module fault coefficient, the specific type of the module to which the time-series data to be queried belongs can be obtained first. This can be done by calling the module management function of the industrial monitoring system to read the attribute information pre-registered in the system, thus clarifying whether it belongs to a simple variable module, functional block module, or third-party data acquisition module of the distributed control system. Based on the confirmed module type, the corresponding module basic coefficient is retrieved from the system's built-in basic coefficient configuration matrix. This basic coefficient is pre-set based on the data update rules, operational stability characteristics, and industrial application scenarios of different modules, with different basic coefficient configurations corresponding to different categories of modules. Historical data quality stamp records of the module within a preset historical period are extracted. These quality stamps record in detail the status information during the data generation process, including fault states such as controller disconnection and network disconnection, as well as the status indicators of normal and valid data. Based on these quality stamp records, the cumulative occurrence duration of various faults of the module within the preset historical period is statistically analyzed. Then, combined with the proportion of the cumulative fault duration in the entire preset historical period, the previously obtained module basic coefficients are adaptively adjusted to ultimately form a module fault coefficient that can accurately match the fault characteristics of the module.

[0026] In obtaining the quality correction factor, a preset historical period for data density analysis can be determined first. This period should align with the typical timeframe requirements for data quality assessment in industrial monitoring. From the historical data storage unit of the industrial monitoring system, all data records of the module to which the queried time-series data belongs within the preset historical period are retrieved. These records are then categorized and sorted according to their quality status, filtering out valid and invalid data. Valid data is data with a quality stamp indicating a normal state, while invalid data includes data marked with various fault states such as controller disconnection or network disconnection. The number of valid data records within the preset historical period is compared to the total number of data records within that period. By calculating the proportion of valid data to the total number of data records, the effective data density of the module within the preset historical period is obtained. Based on the calculated effective data density, and referring to the system's pre-set correction factor generation rules, the corresponding quality correction factor is determined. This ensures that the correction factor objectively reflects the validity of the module's historical data, providing adjustment parameters for the data quality dimension in the subsequent accurate calculation of the backtracking window duration.

[0027] In this embodiment, as shown in the appendix Figure 2 As shown, the module failure coefficient is determined based on the module type where the time-series data to be queried resides and the historical data quality of that module, specifically including: Step S101: Obtain the module type for collecting the time series data to be queried, and query the corresponding module basic coefficients according to the module type.

[0028] Step S102: Extract the historical data quality stamp of the module within a preset historical period interval, obtain the fault duration within the preset historical period interval based on the historical data quality stamp, and obtain the fault impact coefficient based on the proportion of the fault duration within the historical period interval.

[0029] Step S103: Determine the module fault coefficient of the current module based on the module basic coefficient and the fault impact coefficient.

[0030] In this embodiment, the module's basic coefficients are pre-configured based on the update characteristics and stability of the time-series data collected by the module. The historical data quality stamp is used to identify the quality status and fault type of each historical data point. The quality status includes valid status and fault status, and the fault types include, but are not limited to, controller disconnection and network disconnection.

[0031] Specifically, by obtaining the specific type of the module to which the time-series data to be queried belongs, and matching the corresponding module base coefficients based on that type, a benchmark that fits the inherent attributes of the module is established for calculating the module failure coefficients. Different types of modules have fundamentally different functions, data update patterns, and operational stability in industrial monitoring systems. The corresponding module base coefficients are pre-configured based on the typical characteristics of various modules, reflecting the inherent attributes of the modules themselves. This avoids adaptation bias caused by using a uniform benchmark coefficient, ensuring that the subsequent calculation of failure coefficients matches the actual type and characteristics of the module from the very beginning.

[0032] By extracting historical data quality stamps from the module within a preset historical period, the failure duration within that period is further statistically analyzed and its proportion is calculated, ultimately yielding a failure impact coefficient. This transforms the module's historical failure status into a quantifiable parameter that can be used for correction. The historical data quality stamps meticulously record the module's past data quality status and failure types, objectively reflecting the frequency and impact of failures. The failure duration proportion quantifies this failure situation. This allows the calculation of the module failure coefficient to move beyond the inherent characteristics of the module type, incorporating historical failure performance during actual module operation. This enables the failure impact coefficient to dynamically adapt to the module's historical failure patterns, providing a basis for correction that reflects the module's actual failure characteristics for subsequent coefficient integration.

[0033] By integrating the module's basic coefficients and fault impact coefficients to determine the final module fault coefficients, a synergistic fusion of the module's inherent attributes and historical fault performance is achieved. The basic coefficients ensure the compatibility of the coefficients with the module's type characteristics, while the fault impact coefficients supplement the dynamic faults observed during actual module operation. The combination of these two allows the module fault coefficients to comprehensively cover the module's essential attributes and historical operating states. The resulting module fault coefficients neither deviate from the module's inherent type characteristics nor accurately reflect its historical fault situations. This avoids static biases caused by relying solely on inherent attributes or deviations from the module's essence caused by relying solely on historical data, ensuring that the module fault coefficients accurately match the module's actual operating state.

[0034] Specifically, a basic coefficient K0 is set according to the module type, and then dynamically corrected by combining historical data quality stamps, so that the final range of K0 falls within the 10-30 range to ensure that the calculation results of subsequent windows are within the 10-100 second range. When setting the basic coefficient K0, if it is a simple DCS variable, the basic coefficient is K0=15, ensuring stable data updates and preventing the basic window from becoming too large. If it is another module, such as a functional module or third-party collected data, the basic coefficient K0 is preset according to the module's data update characteristics and stability. In this embodiment, the basic coefficient K0 value for a functional module can be K0=20 to ensure adaptation to module characteristics.

[0035] Furthermore, the quality stamp correction method can be achieved by extracting the historical data quality stamps of this module over the past month and recording the fault type: controller disconnection (BAD|OFF), network disconnection (BAD|NETERROR), and normal / valid (GOOD), and calculating the fault impact coefficient α, as shown in the following formula: α = 1 + (Total fault duration / Total 30-day duration) * 10. Where the total fault duration is the cumulative duration of BAD|OFF and BAD|NETERROR, and the value of α ranges from 1 to 11. The more frequent the faults, the larger α is, and the larger the module fault coefficient K is, ensuring that K falls within the range of 10-30.

[0036] The final module failure coefficient K = module base coefficient K0 * α. K is adjusted by α to adapt to the module failure characteristics. The value of K is retained to one decimal place for easy subsequent calculation.

[0037] In this embodiment, when pre-configuring the basic coefficients of the modules, a comprehensive classification and functional definition of all modules to be configured within the industrial monitoring system can be conducted first. This clarifies the core application scenarios and data processing roles of each type of module. For example, it distinguishes between simple variable modules in a distributed control system that directly collect raw data from sensors such as temperature and pressure, functional block modules that perform complex logical operations, and acquisition modules that access data from external third-party systems. For each defined module type, its time-series data update characteristics are analyzed in depth, including the normal range of data update frequency, the stability of the update cycle, and the latency from data generation to transmission to the system. Simultaneously, by combining the module's operational logs over a period of time, its long-term stability performance is evaluated, such as the frequency of failures during historical operation, the average duration of data transmission interruptions, and the efficiency of restoring data continuity after a failure. Based on this, and referencing relevant technical specifications and practical data from similar projects in the industrial monitoring field, a joint evaluation was conducted by technical personnel, maintenance engineers, and system architects. According to the differences in update characteristics and stability among different modules, initial values ​​for the basic coefficients for each type of module were determined: for modules with fixed update frequencies and few long-term operational failures, the initial values ​​of the basic coefficients could be set to a reasonable level to accommodate subsequent fault corrections; for modules with large fluctuations in update frequencies or relatively weak stability, the initial values ​​of the basic coefficients could reserve more room for adjustment to better reflect actual faults. After the evaluation results were determined, the mapping relationship between various modules and their corresponding basic coefficients was entered into the system's parameter configuration library. If the functional positioning, data source, or operating environment of a module changes subsequently, the evaluation process can be restarted, and the basic coefficients updated after technical review to ensure that the configuration always remains consistent with the actual characteristics of the module.

[0038] In the setting and recording of historical data quality stamps, standardized definitions of quality status and fault types can be first established within the industrial monitoring system. Quality status is divided into valid status and fault status. Valid status specifies the judgment conditions that the data can meet, such as the value being within a preset reasonable range, the checksum verification passing during transmission, and the deviation between the data generation time and the system time being within the allowable range. Fault types are based on controller disconnection and network disconnection as the basic categories, supplemented by common fault types in industrial scenarios such as data exceeding the range, data verification failure, and equipment offline. The triggering conditions for each type of fault are defined in detail. For example, if the system does not receive a controller feedback signal for several consecutive acquisition cycles, it is judged as controller disconnection; if a network connection timeout or data packet loss occurs during data transmission, it is judged as network disconnection. During time-series data acquisition, the system's acquisition module can embed real-time quality stamp generation logic. When data is transmitted from sensors, controllers, or external systems to the acquisition terminal, the acquisition module first performs multi-dimensional verification on the data. If the data meets all the criteria for a valid state, it automatically marks the data with a valid state quality stamp. If the verification fails, it matches the corresponding fault type based on the specific anomaly and marks the data with the corresponding fault type quality stamp. Simultaneously, in the system database design, a one-to-one correspondence storage structure between quality stamps and time-series data can be established, ensuring that each time-series data record contains a dedicated quality state field and fault type field, enabling synchronous storage, querying, and retrieval of data and quality information. The quality stamp judgment rules can also be maintained and updated periodically. When new data sources are added to the system or new fault scenarios occur, fault type definitions are promptly supplemented and verification logic optimized to avoid omissions in quality stamp identification. Furthermore, by optimizing the collaboration mechanism between the acquisition module and the storage module, the generation and marking of quality stamps are ensured to be completed synchronously with data acquisition and storage, without any time lag, guaranteeing the accuracy and completeness of subsequent historical data quality stamp extraction.

[0039] In this embodiment, the quality correction factor is determined based on the effective data density in the preset historical period on the module. Specifically, this includes: obtaining the effective data ratio based on the effective state data volume and the total data volume within the preset historical period interval; calculating the quality correction factor based on the effective data ratio to correct the backtracking window; the quality correction factor is configured to correspond to the effective data ratio and increases as the effective data ratio decreases, and is used to increase the backtracking window.

[0040] Specifically, the effective data ratio is calculated based on the amount of effective state data within a preset historical period and the total data volume, thereby obtaining a quality correction factor. This transforms the effectiveness of the module's historical data into a quantitative basis for adjusting the backtracking window. The effective data ratio objectively reflects the quality level of the module's data within the preset period, avoiding biases caused by setting correction parameters solely based on subjective experience, and ensuring that the correction factor accurately matches the true quality status of the module's past data. The quality correction factor is configured to directly correspond to the effective data ratio and increases as the effective data ratio decreases, and is used to enlarge the backtracking window, establishing a dynamic adaptation logic between data quality and the backtracking window size. When the effective ratio of the module's historical data is low, a larger correction factor can drive the backtracking window to expand. In scenarios with poor data quality, expanding the window coverage increases the probability of obtaining effective data, avoiding the loss of effective data due to an excessively small window. Simultaneously, when the data quality is good, the window maintains a reasonable size, balancing the effectiveness of data acquisition with the efficiency of system computation, ensuring that the backtracking window can be flexibly adjusted according to data quality to adapt to actual needs.

[0041] Specifically, the window can be further adjusted based on the density of valid data in historical data to ensure that there is valid data within the window. The following formula can be used: β = 1 + (1 - percentage of valid data) * 2. Where the percentage of valid data = the amount of GOOD status data in the past month / the total amount of data, the value of β ranges from 1 to 3, and the value of β is rounded to one decimal place. The lower the percentage of valid data, the larger β is, and the larger the window is to avoid missing valid data.

[0042] Step S3: After correcting the multicast period of the current time-series data to be queried using the quality correction factor and module failure coefficient, the initial window duration is obtained. The initial window duration is then adjusted according to the set adjustment rules to obtain the final backtracking window duration.

[0043] In this embodiment, step S3 may specifically include the following: Calculate the initial window duration W0, where W0 = multicast period T * module failure coefficient K * quality correction factor β. Round the initial window duration W0 to obtain the intermediate window duration W1. Determine whether the intermediate window duration W1 is within a set duration interval. If the intermediate window duration is within the set duration interval, use the intermediate window duration as the final backtracking window duration. If the intermediate window duration is less than the set duration interval, obtain the preset minimum window duration as the final backtracking window duration. If the intermediate window duration is greater than the set duration interval, obtain the preset maximum window duration as the final backtracking window duration.

[0044] Specifically, when calculating the initial window duration, the multicast period of the previously acquired time-series data to be queried can be used as a basis. Combined with the determined module fault coefficient and quality correction factor, the multicast period is corrected through collaborative adjustment. Specifically, the multicast period is correlated with the module fault coefficient and quality correction factor to ensure that the multicast period fully incorporates the influence of module fault characteristics and historical data quality, thereby generating the initial window duration. After calculating the initial window duration, it is processed according to the system's preset rounding rules to convert the non-integer initial duration into an integer form, obtaining the intermediate window duration. This aims to avoid interference from non-integer times in the time dimension calculation of the industrial monitoring system, ensuring the time matching accuracy in subsequent window applications. Based on the multicast period of the time-series data to be queried, and combined with the determined quality correction factor and module fault coefficient, the two key scenario information—module fault characteristics and historical data quality—are deeply integrated with the native update rhythm of the data, enabling the initial window duration to accurately map the actual operating status and data quality level of the module. The initial window duration no longer depends on a single parameter for generation, but integrates multiple dimensions of actual scene attributes. The initial window duration is rounded to obtain the intermediate window duration, eliminating the interference of non-integer time on the time dimension calculation of the industrial monitoring system and ensuring the accuracy of subsequent windows in the time matching and data extraction stages.

[0045] After obtaining the intermediate window duration, it can be verified and adjusted according to the system's pre-set duration range. This pre-configured duration range is based on factors such as the efficiency of data querying in industrial monitoring scenarios, data integrity requirements, and system computational load, and is used to define a reasonable range for the backtracking window duration. The system's built-in interval judgment logic checks whether the intermediate window duration falls within this pre-set range. If the intermediate window duration falls exactly within the pre-set range, it is directly determined as the final backtracking window duration. If the intermediate window duration is less than the lower limit of the pre-set range, it indicates that the current duration may not be able to cover enough historical data to ensure data validity. In this case, the system's pre-configured minimum window duration parameter can be used as the final backtracking window duration. If the intermediate window duration is greater than the upper limit of the pre-set range, it indicates that the current duration may lead to excessive data volume, increasing the system's computational burden and affecting query efficiency. In this case, the system's pre-set maximum window duration parameter can be used as the final backtracking window duration, thus ensuring that the final backtracking window duration is both practically applicable and adaptable to the system's operational capabilities.

[0046] Specifically, the initial window duration W0 = multicast period T * module failure coefficient K * quality correction factor β. The calculation result is rounded to the nearest integer, while ensuring that W0 falls within the range of 10-100 seconds. If the rounded W1 is less than 10 seconds, it is forcibly set to 10 seconds; if W1 is greater than 100 seconds, it is forcibly set to 100 seconds, adapting to the data characteristics of different modules and facilitating system time-dimensional calculations.

[0047] The following two specific examples will be used to illustrate this.

[0048] Specific example 1: If it is a simple variable in DCS, then T is assumed to be 1 second. If the total fault duration in the past month accounts for 5%, then α = 1 + 0.05 * 10 = 1.5. If the effective data percentage is 98%, then β = 1 + (1 - 0.98) * 2 = 1.04. Then W0 = 1 * 15 * 1.5 * 1.04 ≈ 23.4 seconds, which is rounded to 23 seconds, falling within the range of 10-100 seconds, suitable for scenarios with low fault frequency and good data quality. Specific Example 2: If it is a certain functional block module, the preset T=5 seconds, the module base coefficient K0=20, and the proportion of the total fault time in the past month is 2%, then α=1+0.02*10=1.2. If the effective data proportion is 95%, then β=1+(1-0.95)*2=1.1. Then W0=5*20*1.2*1.1=132 seconds, which is rounded to 132 seconds. If it exceeds 100 seconds, it is forcibly set to 100 seconds to adapt to scenarios with low-frequency updates and limitable window limits.

[0049] Finally, after obtaining the final backtracking window duration through the above method, for each sampling moment, all original data values ​​within the previous backtracking time length can be extracted from the original time series database. The original data value with the timestamp closest to the sampling moment is selected as the target data value for that sampling moment. After sorting the target data values ​​of all sampling moments by time, trend chart data within the required query time span is generated. Thus, by using the same backtracking window duration, the traditional data retrieval logic within the sampling interval is abandoned, ensuring the consistency of data source for the same moment across different spans from the root, and resolving the data inconsistency problem.

[0050] The adaptive backtracking window calculation and acquisition method disclosed in the above embodiments obtains the multicast period of the time-series data to be queried, determines the module failure coefficient based on the module type of the time-series data to be queried and the historical data quality of the module, and determines the quality correction factor based on the effective data density of the module in the preset historical period. After correcting the multicast period of the current time-series data to be queried using the quality correction factor and the module failure coefficient, an initial window duration is obtained. Finally, the initial window duration is adjusted according to the set adjustment rules to obtain the final backtracking window duration. This provides a unified sampling backtracking window to standardize sampling data acquisition under different spans. At the same time, it solves the problem that the traditional method of directly acquiring data through a pre-set fixed backtracking window does not take into account the differences in data update frequency and failure characteristics of different modules in industrial scenarios, which easily leads to data redundancy in high-frequency modules and data loss in low-frequency modules, and cannot take into account the availability of data for multiple modules.

[0051] In another embodiment, as shown in the appendix Figure 3 As shown, an adaptive backtracking window duration acquisition device is also disclosed, comprising: a multicast cycle query module 1, a modified data acquisition module 2, and a backtracking window duration calculation module 3. The multicast cycle query module 1 is used to acquire the multicast cycle of the time-series data to be queried, wherein the multicast cycle is the original update cycle of the time-series data in the module; the modified data acquisition module 2 is used to determine the module failure coefficient based on the module type of the time-series data to be queried and the historical data quality of the module, wherein the module failure coefficient is adapted to the module failure characteristics; and to determine a quality correction factor based on the effective data density in a preset historical period on the module; the backtracking window duration calculation module 3 is used to correct the multicast cycle of the current time-series data to be queried using the quality correction factor and the module failure coefficient to obtain an initial window duration, and to adjust the initial window duration according to a set adjustment rule to obtain the final backtracking window duration.

[0052] The functions of the adaptive backtracking window duration acquisition device described above basically correspond to the steps of the adaptive backtracking window calculation and acquisition method disclosed in the previous embodiments. Therefore, they will not be described in detail here. For details, please refer to the embodiments of the adaptive backtracking window calculation and acquisition method disclosed in the previous embodiments. It should be noted that the embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other.

[0053] In other embodiments, an adaptive backtracking window duration acquisition system is also disclosed, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the various steps of the adaptive backtracking window calculation and acquisition method described in the above embodiments.

[0054] The processor can be a central processing unit, or other general-purpose processors, digital signal processors, application-specific integrated circuits, off-the-shelf programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the server device, connecting various parts of the server device via various interfaces and lines.

[0055] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the server device by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one functional application program, etc. In addition, the memory may include high-speed random access memory and non-volatile memory, etc.

[0056] If the adaptive backtracking window calculation and acquisition method is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, etc.

[0057] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

[0058] In summary, the above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made within the scope of the claims of the present invention should be covered by the present invention.

Claims

1. A method for obtaining an adaptive backtracking window length, characterized in that, The method comprises the following steps: acquiring a multicast period of the time series data to be queried, the multicast period being an original update period of the time series data in a module; determining a module fault coefficient based on a module type in which the time series data to be queried is located and historical data quality of the module, the module fault coefficient being adapted to a module fault characteristic; and determining a quality correction factor based on effective data density in a preset historical period in the module; correcting the multicast period of the time series data to be queried using the quality correction factor and the module fault coefficient to obtain an initial window length, and adjusting the initial window length to obtain a final backtracking window length according to a set adjustment rule.

2. The self-adaptive backtracking window length acquisition method according to claim 1, characterized in that: the original update period of the time series data in the module is an update period of a basic variable data of a distributed control system in an industrial monitoring system, or an update period of collected data adjusted in advance according to a current application scenario of each module.

3. The method of claim 2, wherein, The module fault coefficient is determined based on the module type in which the time series data to be queried is located and historical data quality of the module, and specifically comprises: acquiring a module type in which the time series data to be queried is collected, and acquiring a corresponding module basic coefficient according to the module type; extracting a historical data quality mark of the module in a preset historical period interval, acquiring a fault duration in the preset historical period interval based on the historical data quality mark, and obtaining a fault influence coefficient based on a proportion of the fault duration in the historical period interval; determining the module fault coefficient of the current module based on the module basic coefficient and the fault influence coefficient.

4. The method of claim 3, wherein: The module basic coefficient is pre-configured according to time series data update characteristics and stability collected by the module.

5. The method of claim 4, wherein: The historical data quality mark is used to identify quality states and fault types of each historical data, the quality states include an effective state and a fault state, and the fault types include but are not limited to controller disconnection and network disconnection.

6. The method of claim 5, wherein, The quality correction factor is determined based on effective data density in a preset historical period in the module, and specifically comprises: acquiring an effective data proportion based on an effective state data amount and a total data amount in a preset historical period interval, and calculating the quality correction factor based on the effective data proportion to correct the backtracking window; the quality correction factor is configured to correspond to the effective data proportion, and becomes larger as the effective data proportion becomes smaller and is used to increase the backtracking window.

7. The method of claim 6, wherein, The step S3 specifically comprises: calculating an initial window length W0, W0=T* K* β, taking the initial window length W0 to obtain an intermediate window length W1 after rounding, and judging whether the intermediate window length W1 is in a set length interval; if the intermediate window length is in the set length interval, the intermediate window length is taken as the final backtracking window length; if the intermediate window length is smaller than the set length interval, a preset minimum window length is taken as the final backtracking window length; and if the intermediate window length is larger than the set length interval, a preset maximum window length is taken as the final backtracking window length.

8. An adaptive backtracking window duration acquisition device, characterized in that, The method comprises: The multicast period query module is configured to obtain a multicast period of the time series data to be queried, the multicast period being an original update period of the time series data in the module; The modification data acquisition module is configured to determine a module fault coefficient based on a type of the module in which the time series data to be queried is located and historical data quality of the module, the module fault coefficient adapting a module fault characteristic; and determine a quality correction factor based on effective data density in a preset historical period on the module. The backtracking window duration calculation module is configured to correct the multicast period of the current time series data to be queried using the quality correction factor and the module fault coefficient to obtain an initial window duration, and adjust the initial window duration according to a preset adjustment rule to obtain a final backtracking window duration.

9. An adaptive backtracking window length acquisition system comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1-7.

10. A computer-readable storage medium, the computer-readable storage medium storing a computer program, characterized in that: The computer program is executed by the processor to implement the steps of the method according to any one of claims 1-7.