A data acquisition method and system based on edge computing and intelligent cache strategy

By unifying the time-series generation of data streams and constructing cache entries and importance classifications in smart building and park scenarios, and by utilizing reinforcement learning and resource constraints, the problems of unstable and redundant data acquisition in edge caching technology are solved, thereby achieving the reliability of data supply and system stability.

CN122152886APending Publication Date: 2026-06-05THE FIRST COMPARY OF CHINA EIGHTH ENG BUREAU LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
THE FIRST COMPARY OF CHINA EIGHTH ENG BUREAU LTD
Filing Date
2026-02-05
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

In smart building and park scenarios, existing edge caching technologies lack dynamic anti-control mechanisms, resulting in continuous high-frequency collection and transmission of redundant data even when the network is congested. Inconsistent time-series alignment of multi-source data affects the stability of policy learning, and adaptive policies are prone to critical data sampling degradation or system jitter. There is a lack of hard constraints on business security and real-time performance.

Method used

By generating data streams in a unified time series, constructing cache entries and importance classifications, and using reinforcement learning to drive prefetching, TTL and sampling back control, combined with rules and resource constraints, we can ensure the freshness and stable operation of Class A data, and reduce backhaul and latency.

Benefits of technology

This improved the reliability of data supply at the edge, ensuring the freshness of critical data and stable system operation, reducing backhaul volume and latency, and optimizing resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122152886A_ABST
    Figure CN122152886A_ABST
Patent Text Reader

Abstract

The application provides a data collection method and system based on edge computing and intelligent cache strategy, and belongs to the field of Internet of Things data calculation. The technical scheme is as follows: collecting multi-source data and processing running conditions to generate unified data flow; constructing a cache object model and a system state vector based on the unified data flow, and implementing importance classification on the data of the cache object model; inputting the system state vector into a decision model to output a joint action, and correcting the feasibility of the joint action; executing the corrected joint action, processing the obtained data to realize hierarchical data supply; evaluating the effect of the hierarchical data supply to form an optimization closed loop. The application has the beneficial effects that: the application generates data flow in a unified time sequence on the edge side, constructs cache entries and importance classification, strengthens learning-driven prefetching, TTL and sampling counter-control, and guarantees A-class freshness and stable operation through rules, resource constraints and degradation fallback, thereby reducing backhaul and time delay and improving data supply reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet of Things (IoT) data computing, and in particular to a data acquisition method and system based on edge computing and intelligent caching strategies. Background Technology

[0002] As the digital operation of smart buildings and smart parks deepens, massive amounts of heterogeneous data from physical sensors, security access control, and maintenance systems are continuously generated. The data acquisition system is gradually evolving from a centralized cloud-based model to a layered architecture of edge computing and cloud collaboration. At the edge, through proximity access and preprocessing, low-latency response and reduced backhaul bandwidth consumption are achieved, supporting real-time services such as alarm linkage, device control, and energy consumption optimization. Simultaneously, caching technology has expanded from traditional static caching to intelligent caching oriented towards the data lifecycle. Combined with time window alignment, standardized cleaning, access frequency modeling, and policy learning, the stability and timeliness of data supply are improved, providing a foundation for continuous sensing and closed-loop control in complex scenarios.

[0003] Despite the increasing maturity of edge computing and caching technologies, systemic shortcomings still exist in smart building / campus scenarios. Firstly, existing edge caches primarily aim to improve hit rates and reduce access latency, focusing optimization on "storage replacement and residency strategies." They typically treat data collection as a pre-process triggered by fixed periods or simple events, lacking a mechanism for "dynamic counter-control of collection behavior by caching strategies." This leads to continuous high-frequency collection and transmission even during network congestion or resource shortages, failing to suppress redundant data flows at the source. Secondly, multi-source data suffers from inconsistent sampling frequencies, clock drift, and network latency jitter. Existing methods often employ coarse-grained time alignment or single cleaning rules, making it difficult to form a unified data flow directly usable for decision-making and caching modeling within a uniform time window. This results in instability in the "state-action-feedback" correspondence during subsequent policy learning, affecting policy convergence and reproducibility. Third, purely data-driven adaptive strategies (such as reinforcement learning caching or prefetching) are prone to uncontrollable behavior in engineering scenarios: high-priority data such as security alarms and critical faults may be sampled downgraded or evicted, or system instability may occur when cache capacity / resource load exceeds limits. Existing technologies generally lack mechanisms to explicitly solidify business security and real-time requirements into "hard constraint guardrails," and also lack engineering guarantees for quickly reverting to historical stable parameters or fallback strategies when indicators degrade. Therefore, it is difficult to simultaneously achieve the combined technical effects of "critical data freshness, stable resource operation, controllable backhaul volume, and online adaptive optimization." Summary of the Invention

[0004] The purpose of this invention is to provide a data acquisition method and system based on edge computing and intelligent caching strategies. This invention unifies the temporal generation of data streams at the edge, constructs cache entries and importance classifications, uses reinforcement learning to drive prefetching, TTL and sampling back control, and ensures A-class freshness and stable operation with rules and resource constraints and degradation rollback, thereby reducing backhaul and latency and improving the reliability of data supply.

[0005] This invention is achieved through the following measures: A data acquisition method based on edge computing and intelligent caching strategies, characterized by the following steps: Collect multi-source data and operating scenarios, perform time window alignment and standardization processing on the multi-source data and operating scenarios, and generate a unified data stream; Based on the unified data flow, a cache object model and a system state vector are constructed, and the data in the cache object model is classified according to importance based on business rules; The system state vector is input into the decision model output buffer and acquisition joint action, and the feasibility of the joint action is modified by the importance classification and preset constraints; The acquisition and caching instructions in the joint action after the feasibility correction are executed to perform edge processing and cache update on the acquired data, thereby achieving hierarchical data supply. The effectiveness of the hierarchical data supply is evaluated to obtain feedback indicators, and the parameters of the decision model are updated based on the feedback indicators to form an adaptive optimization closed loop.

[0006] The invention also has the following specific features: The collection of multi-source data and operating context includes: using an edge gateway or edge server as an edge node to collect physical sensor data and business event data from connected sensing devices and business systems, and collecting contextual data to characterize the system operating status from the edge node itself and its network interface. The physical sensing data includes environmental status monitoring data, equipment operating parameters and energy consumption metering data; the business event data includes status change events and alarm events generated by security, access control and operation and maintenance systems; and the contextual data includes spatial location identifiers, time period labels, area occupancy levels, network performance indicators and edge node resource load indicators.

[0007] The step of aligning and standardizing the multi-source data with the operating context using time windows to generate a unified data stream includes: Set a preset window length and divide the processing window accordingly, and assign a unified processing window identifier to the physical sensing data, the business event data and the contextual data; align the physical sensing data, the business event data and the contextual data from different data sources and with different native timestamps into the same processing window according to the correspondence between their timestamps and the processing window identifiers. Perform standardized cleaning and formatting transformation on data within the same processing window. The standardized cleaning includes filling in missing data and identifying, correcting or marking abnormal data. The formatting transformation includes converting the data into a uniform structure with predetermined fields and types. The data, after being aligned and standardized by the time window, is organized and output according to the processing window identifier order to form the unified data stream consisting of multiple consecutive processing window data.

[0008] Constructing a cache object model and system state vector based on the unified data flow includes: Based on each piece of data in the unified data stream, a cache entry with a unique identifier is generated in the cache namespace of the edge node, and a cache object model is formed using the cache entry. The cached entries include at least a data payload field, a timestamp field, a priority field, a freshness threshold field, and a time-to-live (TTL) field. Simultaneously, based on the cached access log records, data time attributes, and the contextual data in the unified data stream, a system state vector is generated that includes multiple dimensions, including at least a data access characteristic dimension, a data time attribute dimension, and a resource and context dimension.

[0009] Implementing importance grading for data in the cached object model according to business rules includes: The cache entries are analyzed and classified according to predefined hierarchical rules associated with business security and real-time requirements. The hierarchical rules identify data entries involving security alarms and critical faults as category A, data entries used for real-time device control and system linkage as category B, and data entries used for environmental monitoring and statistical analysis as category C. Based on the classification results, the highest priority field value and the lowest freshness threshold field value are set for cache entries classified as A, the medium priority field value and the freshness threshold field value determined according to the control period are set for cache entries classified as B, and the basic priority field value and the larger freshness threshold field value are set for cache entries classified as C.

[0010] The step of inputting the system state vector into the decision model and outputting the combined action of buffering and acquisition includes: inputting the system state vector into the policy model obtained by reinforcement learning training for calculation, so as to generate and output the combined action of buffering and acquisition; The caching and acquisition joint action includes at least prefetching decision, cache maintenance decision and sampling reverse control decision; the prefetching decision is used to determine the set of entries that need to be prefetched and loaded into the cache, the cache maintenance decision is used to indicate the time-to-live (TTL) management and eviction weight of cache entries, and the sampling reverse control decision is used to control the acquisition mode of the data source, the acquisition mode includes at least one or more of sampling frequency, event trigger threshold and reporting content format.

[0011] The feasibility correction of the joint action using the importance classification and preset constraints includes: Based on the importance classification, rule constraints are applied to each decision in the joint action of caching and acquisition, and dynamic constraints are applied based on the system resource status. In particular, according to the aforementioned rules, the pre-fetching and caching of Class A key data are forcibly guaranteed, and the downgrade operation of the collection mode of Class A data is restricted. According to the dynamic constraints, when the cache capacity or edge node resource load exceeds the limit, the prefetched item set is pruned or the sampling reverse control decision is downgraded according to the importance classification. When pruning or downgrading, it takes priority on C-class items and then on B-class items. The combined action after being modified by the rule constraints and the dynamic constraints is output.

[0012] The process of executing the acquisition and caching instructions in the modified joint action to perform edge processing and cache updates on the acquired data and achieve hierarchical data supply includes: parsing and executing the acquisition and caching instructions in the modified joint action to acquire corresponding data; performing edge computing processing on the acquired data and writing the processing result or the original data verified by preset quality rules as the data payload into the corresponding cache entry in the cache object model to complete the cache update; Based on the importance classification of the cached entries, a differentiated strategy corresponding to the A, B, and C classifications is adopted to respond to data requests and report data to the cloud, thereby realizing the classified data supply.

[0013] Evaluating the effectiveness of the tiered data supply to obtain feedback indicators, and updating the parameters of the decision model based on the feedback indicators to form an adaptive optimization closed loop, includes: Based on the operational effect of the hierarchical data supply, combined with the cache access log records of the cache object model and the contextual data, a set of feedback indicators is calculated. The set of feedback indicators includes at least the cache hit rate, average response latency, backhaul data volume, edge node resource load, and freshness compliance rate of Class A key data. The set of feedback indicators is transformed into a reward signal or loss function input for updating the decision model, and the parameters of the decision model are updated using an online learning method based on the reward signal or loss function input. When the set of feedback metrics meets the preset degradation conditions, a rollback mechanism is triggered to restore the parameters to historical stable parameters or switch to a safety net strategy based on business rules, thereby forming an adaptive optimization closed loop driven by feedback metrics.

[0014] A system employing the aforementioned data acquisition method based on edge computing and intelligent caching strategies is characterized in that...

[0015] Multi-source acquisition and alignment module: Acquires multi-source data and operating context, performs time window alignment and standardization processing on the multi-source data and operating context, and generates a unified data stream; Cache modeling and grading module: Constructs a cache object model and system state vector based on the unified data flow, and performs importance grading on the data in the cache object model according to business rules; Joint decision constraint module: Inputs the system state vector into the decision model output buffer and collects joint actions, and uses the importance classification and preset constraints to perform feasibility correction on the joint actions; Edge processing supply module: Executes the acquisition and caching instructions in the joint action after feasibility correction, performs edge processing and cache update on the acquired data, and realizes hierarchical data supply; Feedback learning closed-loop module: Evaluate the effectiveness of the hierarchical data supply to obtain feedback indicators, and update the parameters of the decision model based on the feedback indicators to form an adaptive optimization closed loop.

[0016] The beneficial effects of this invention are as follows: This invention generates data streams in a unified time sequence at the edge, constructs cache entries and importance classification, uses reinforcement learning to drive prefetching, TTL and sampling back control, and ensures the freshness and stable operation of Class A data with rules and resource constraints and degradation rollback, thereby reducing backhaul and latency and improving the reliability of data supply. Attached Figure Description

[0017] Figure 1 The overall flowchart of the data acquisition method based on edge computing and intelligent caching strategy provided in the embodiments of the present invention is shown. Detailed Implementation

[0018] To clearly illustrate the technical features of this solution, the following detailed implementation method will be used to explain the solution.

[0019] Example 1 See Figure 1 A data acquisition method based on edge computing and intelligent caching strategies, characterized by the following steps: Step S1: Collect multi-source data and operating scenarios, perform time window alignment and standardization processing on the multi-source data and operating scenarios, and generate a unified data stream; The collection of multi-source data and operational context includes: using edge gateways or edge servers as edge nodes to collect physical sensor data and business event data from connected sensing devices and business systems, and collecting contextual data from the edge nodes themselves and their network interfaces to characterize the system's operational status. Among them, physical sensing data includes environmental status monitoring data, equipment operating parameters and energy consumption metering data; business event data includes status change events and alarm events generated by security, access control and operation and maintenance systems; and contextual data includes spatial location identifiers, time period labels, area occupancy levels, network performance indicators and edge node resource load indicators.

[0020] Time window alignment and standardization are performed on multi-source data and operational contexts to generate a unified data stream, including: Set a preset window length and divide the processing window accordingly, and assign a unified processing window identifier to physical sensor data, business event data and contextual data; align physical sensor data, business event data and contextual data from different data sources and with different native timestamps into the same processing window according to the correspondence between their timestamps and processing window identifiers. Perform standardized cleaning and formatting transformation on data within the same processing window. Standardized cleaning includes filling in missing data and identifying, correcting or marking outlier data. Formatting transformation includes converting data into a uniform structure with predetermined fields and types. The data, after being aligned and standardized by time window, is organized and output according to the processing window identifier to form a unified data stream consisting of data from multiple consecutive processing windows.

[0021] Step S1 specifically includes: In this embodiment, edge gateways or edge servers are set up as edge nodes in smart buildings or smart parks. The edge nodes establish data access channels with various sensing devices and business systems to realize the collection of multi-source data and operating scenarios. Time window alignment and standardization processing are completed at the edge side, and a unified data stream is output so that subsequent steps can construct a cache object model and system state vector based on the unified data entry point. First, edge nodes collect physical sensing data and business event data from connected sensing devices and business systems, and collect contextual data from the edge nodes themselves and their network interfaces to characterize the system's operating status.

[0022] Among them, physical sensor data includes at least environmental status monitoring data, equipment operating parameters and energy consumption metering data; business event data includes at least status change events and alarm events generated by security, access control and operation and maintenance systems; contextual data includes at least spatial location identifiers, time period labels, area occupancy levels, network performance indicators and edge node resource load indicators.

[0023] To ensure consistency in subsequent processing, edge nodes append necessary metadata to each arriving data record, including at least a data category identifier, data source identifier, native timestamp, and spatial location identifier, and write it into a windowed processing buffer queue. The purpose of this processing in this invention is that subsequent steps will construct a system state vector based on a unified data flow and drive the decision model to output a combined buffering and acquisition action. Without contextual dimensions such as network performance and resource load, or without a unified source identifier, it is difficult to distinguish between "changes in business requirements" and "access degradation caused by link congestion or changes in edge load," which can easily introduce unstable prefetching or sampling counter-control actions. Therefore, structuring and outputting the operating context and data records together in stage S1 is a prerequisite for providing interpretable input for subsequent joint decision-making. Secondly, edge nodes are set with a preset window length and the processing window is divided accordingly. A unified processing window identifier is assigned to physical sensing data, business event data and contextual data.

[0024] Specifically, the edge node sets the window reference start time and maps the native timestamp of any data record to a window sequence number. Then, the processing window identifier is generated from the window sequence number. For example:

[0025] in: For data record sequence number; For the first The original timestamp of each data record; Use the window reference start time; The preset window length; It is the floor function; For the first The window number to which each data record belongs; For the first The identifier for the processing window of each data record; This is a function for generating window identifiers, used to map window numbers to unique window identifiers.

[0026] In engineering implementation, different data sources may experience acquisition delays, network jitter, or device clock drift, causing related data for the same business event or the same physical process to fall near the boundaries of adjacent windows. To reduce cross-window fragmentation, edge nodes can set a tolerance threshold at window boundaries when performing the "alignment to the same processing window according to the correspondence between their timestamps and processing window identifiers": when the original timestamp of a record is near the window boundary, it is merged into the processing window consistent with the related record according to preset rules, thereby improving the semantic consistency of multi-source data within the same window.

[0027] The role of this mechanism in this invention is explained as follows: Business event data is sudden. If an alarm triggering event is assigned to window A, while the adjacent device operating condition fluctuations and network performance indicators are assigned to window B, then a "event-response" correlation break will occur when constructing the system state vector at the window granularity. This will cause the decision model to mistakenly interpret the break as a change in demand or a cache failure, thereby inducing unnecessary prefetching or sampling counter-control operations. S1, through window-level consistency alignment, can reduce the sources of such pseudo-changes and provide a basis for the stability of subsequent decisions. Subsequently, the edge nodes perform standardization cleaning and formatting transformation on the data within the same processing window. Standardization cleaning includes at least imputing missing data and identifying, correcting, or marking outlier data.

[0028] For periodically acquired physical sensor data, when missing measurement points appear within a certain window, edge nodes can be filled using linear interpolation of adjacent valid observations to ensure the availability of statistical features or subsequent aggregated inputs within the window:

[0029] in: The index of the missing data point; For at any time The estimated value obtained by filling in the gaps; The most recent valid forward observation; The most recent backward valid observation; for The corresponding timestamp; for The corresponding timestamp; This is the timestamp corresponding to the missing point.

[0030] Generally satisfies and Otherwise, forward padding or null labeling is used to handle missing data. For anomalous data, edge nodes are identified according to preset quality rules, and the identified outliers are corrected or labeled. The purpose of setting the quality rules here in this invention is to provide a reliable input basis for subsequent importance classification and joint action correction: for example, if there are unidentified spike noises in the critical data of category A, it will cause an abnormal increase in the relevant dimension of the system state vector in the windowed input, causing the strategy model to output biased actions; when the abnormal state is explicitly marked in stage S1, the mark can be used as part of the data quality state to participate in the construction of the system state vector, so that the decision model can respond to "changes in data credibility" differently from "changes in business needs", thereby improving the robustness of the smart park in complex scenarios.

[0031] Formatting conversion is used to unify data with different protocols, field names, and units of expression into structured records with predetermined fields and types, so that the three types of data can be organized in a window and output sequentially under the same structural framework.

[0032] The unified data stream output in step S1 can be organized in the form of window-level data packets, for example: { "window_id": "W-20260129-1030", "edge_node_id": "EDGE-01", "records": [ { "category": "sensor", "source_id": "TEMP-03", "orig_ts": 1769663421, "space_tag": "B1-F3-Z12", "payload": { "value": 24.6, "unit": "C"} }, { "category": "context", "source_id": "EDGE-01", "orig_ts": 1769663440, "payload": { "cpu_load": 0.63, "net_rtt": 22} } ] } Here, orig_ts corresponds to the native timestamp. window_id corresponds to the identifier of the processing window. The payload corresponds to the formatted data payload field; the category is used to distinguish between physical sensor data, business event data and contextual data; source_id is the data source identifier; and space_tag is the spatial location identifier.

[0033] Through the aforementioned window-level unified structure, the S1 stage achieves alignment of data from different sources, timestamps, and semantics within the same processing window and outputs it with unified fields. This enables subsequent steps to directly generate unique identifiers for cache entries based on fields such as window_id, category, and source_id, and populate the cache entry fields. At the same time, it avoids repeating field normalization and time-series alignment in subsequent steps, thereby improving the consistency and feasibility of subsequent modeling and decision-making processes.

[0034] Finally, the edge nodes organize and output the data after time window alignment, standardization, cleaning, and formatting according to the processing window identifier order, forming a unified data stream consisting of multiple consecutive processing window data, and using this unified data stream as the input data basis for subsequent steps.

[0035] The key problem solved by the above S1 process under the concept of this invention is that in the scenario of multi-source heterogeneous data in smart buildings / parks, traditional acquisition methods often lack unified window-level alignment and structured context integration, resulting in a lack of stable state expression for subsequent caching and acquisition decisions. This invention binds "data content - context state - time window" within the same structure through window-level unified data stream output, thereby laying a verifiable data foundation for subsequent joint action decisions, feasibility correction and adaptive updates.

[0036] Step S2: Construct a cache object model and system state vector based on a unified data flow, and classify the data in the cache object model according to business rules; The cache object model and system state vector constructed based on unified data flow include: Based on each piece of data in the unified data stream, a cache entry with a unique identifier is generated in the cache namespace of the edge node, and a cache object model is formed from the cache entries. The cached entries include at least a data payload field, a timestamp field, a priority field, a freshness threshold field, and a time-to-live (TTL) field. At the same time, based on the cached access log records, data time attributes, and contextual data in the unified data stream, a system state vector is generated that includes multiple dimensions, including at least a data access characteristic dimension, a data time attribute dimension, and a resource and context dimension.

[0037] Implementing importance grading for data in the cached object model based on business rules includes: Based on predefined hierarchical rules associated with business security and real-time requirements, cached entries are analyzed and classified. The hierarchical rules classify data entries involving security alarms and critical faults as Class A, data entries used for real-time device control and system linkage as Class B, and data entries used for environmental monitoring and statistical analysis as Class C. Based on the classification results, the highest priority field value and the lowest freshness threshold field value are set for cache entries classified as A, the medium priority field value and the freshness threshold field value determined according to the control period are set for cache entries classified as B, and the basic priority field value and the larger freshness threshold field value are set for cache entries classified as C.

[0038] Step S2 specifically includes: After completing step S1, the edge nodes have output a unified data stream in the order of the processing window identifiers; In this embodiment, the edge node reads the data packets of each processing window in the unified data stream (the window_id and records structures in S1), and constructs a cache object model at the "record level" granularity in the local cache namespace. At the same time, it forms a system state vector to represent the current system operating status. Then, it performs importance classification on the cache entries according to predefined classification rules, and writes the classification results back to the corresponding cache entries in the form of fields. This provides a calculable and traceable input basis for the subsequent step of "joint action decision based on system state vector".

[0039] (a) Generation of unique identifiers for cache entries and construction of cache object models Edge nodes for each processing window Each data record within the cache is parsed, at least the data category identifier, data source identifier, spatial location identifier, and data payload fields are read, and a unique identifier for the cache entry corresponding to the record is generated within the cache namespace.

[0040] To avoid engineering problems such as "source conflicts, overwrites, or duplicate caching" that occur with multi-source heterogeneous data in smart buildings / parks on the same edge node, this embodiment adopts a deterministic key generation method. This method maps the unique identifier of a cached entry to a combination of the processing window identifier and key metadata. For example:

[0041] in: For data record sequence number; For the first Each data record is a unique identifier for the cached entry. For deterministic encoding or hash mapping functions; Field concatenation operators; For the first The identifier of the processing window to which each data record belongs; For the first Data category identifier for each data record; For the first The data source identifier for each data record; For the first Spatial location identifier for each data record.

[0042] In obtaining Then, the edge nodes create or update the corresponding cache entries, and form a cache object model with all cache entries.

[0043] A cached entry includes at least a data payload field, a timestamp field, a priority field, a freshness threshold field, and a time-to-live (TTL) field. The data payload field is written with the structured data payload output in step S1 (e.g., payload or its compliant aggregation result within a window). The timestamp field is used to identify the time attribute source of the current data in the entry. The priority field and the freshness threshold field are used for subsequent differentiated services and constraint control. The TTL field is used to indicate the upper limit of the cache lifecycle.

[0044] In this embodiment, to ensure consistency with the native timestamp logic of S1 and facilitate subsequent data age calculation, the timestamp field of cached entries can be assigned values ​​according to the following rules: if the entry directly corresponds to the native timestamp of a record, then the native timestamp is written as the entry's timestamp field; if the entry is a window-level aggregation or feature result, then the window reference time (e.g., the window end time) is written as the entry's timestamp field. This rule avoids the problem of "unclear cache update time leading to distortion in freshness calculation," making the subsequent construction of state vectors based on the entry's time attributes feasible.

[0045] (ii) Generation of cache access log records and construction of system state vectors To form a system state vector, edge nodes generate cache access log records for data request behavior on the cache subsystem side.

[0046] The cache access log records at least include the following fields: request occurrence time, cache entry identifier or equivalent index pointed to by the request, hit or miss flag, response latency sample, and the amount of data returned when a miss is triggered (e.g., the number of bytes of data retrieved from the data source / upper-level node). Edge nodes aggregate and statistically analyze the above access logs according to the processing window to obtain the access characteristic dimension; simultaneously, they combine the cache entry timestamp field and the freshness threshold field to obtain the data time attribute dimension; and extract network performance indicators and edge node resource load indicators from the contextual data in step S1 to form resource and contextual dimensions, which are ultimately synthesized into a system state vector.

[0047] In the processing window Within the edge nodes, access logs can be used to calculate cache hit rate and average response latency:

[0048] ; in: To process windows Cache hit rate within the cache; To process windows Number of hits within; To process windows Total number of requests within; To process windows Average response time within; The request sequence number; For the first Response latency sample for each request; To handle window identifiers.

[0049] Furthermore, to characterize the "data time attribute dimension," edge nodes target cache entries. Calculate the age of the data and create a comparable normalized value using a freshness threshold: ; ; in: The cache entry is identified as Data age; To process windows The reference time (e.g., the window end time, consistent with the S1 window organization); The cache entry is identified as The timestamp field value is obtained from the native timestamp or window reference time. Normalized representation of entry freshness; The cache entry is identified as The value of the freshness threshold field.

[0050] Based on this, edge nodes will access feature dimensions (such as...) and statistics on the amount of data returned), data time attribute dimensions (such as...) Or its statistics on the set of key items) and resource and context dimensions (network performance indicators from S1 are concatenated in a predetermined order to form a system state vector. The purpose of constructing this vector is that traditional edge caching that relies solely on hit rate is difficult to distinguish between "hit but close to being outdated" and "miss but tolerable latency". However, this invention encodes freshness constraints and context resources into the state vector in the S2 stage, which can provide input basis that reflects the real operating situation for subsequent joint action decisions, thereby supporting the overall concept of "dynamic anti-control of collection behavior by caching strategy".

[0051] (III) Importance ranking rule matching and field assignment write-back After obtaining the cached object model and system state vector, the edge nodes analyze and classify the cached entries according to predefined hierarchical rules associated with business security and real-time requirements.

[0052] The input to the grading rules may include at least: the data category identifier, data source identifier, spatial location identifier, identifiable event type / measurement point type in the data payload, and contextual elements such as time period label and area occupancy level from the output of step S1. Edge nodes match rules one by one for each entry in the cached object model and determine the category: data entries involving safety alarms and critical faults are classified as category A; data entries used for real-time equipment control and system linkage are classified as category B; and data entries used for environmental monitoring and statistical analysis are classified as category C.

[0053] Subsequently, the edge nodes assign values ​​to the cached entry fields based on the classification results and write them back: for Class A cached entries, the highest priority field value and the lowest freshness threshold field value are set; for Class B cached entries, a medium priority field value and a freshness threshold field value determined according to the control period are set; and for Class C cached entries, a basic priority field value and a larger freshness threshold field value are set.

[0054] To ensure feasibility, the control cycle in this embodiment can be obtained by preset / configuration, or determined by equipment control strategies and business rules (such as air conditioning terminal control cycle, elevator linkage strategy refresh cycle, etc.), so that the freshness threshold field of Category B items can be consistent with the timeliness requirements of the actual control closed loop.

[0055] Furthermore, the TTL field, serving as the upper limit of an entry's lifecycle, can be initialized with the system's default configuration when the entry is created. After classification is completed, it allows for differentiated configurations based on categories A, B, and C: for example, category A entries can be configured with a longer TTL to ensure the continuity of cache residency, while category C entries can be configured with a shorter TTL to save cache space. This configuration does not change the logic that "freshness threshold determines data serviceability," but rather decouples "lifecycle management (TTL)" from "real-time availability (freshness threshold)" at the entry level, thereby avoiding the semantic confusion commonly encountered in engineering where "the cache is still there, but the data no longer meets real-time requirements."

[0056] Step S2 completes the structured transformation from the unified data flow in Step S1 to "cached object model - system state vector - importance classification field write-back": On the one hand, the unique identifier of the cached item and the field classification result enable subsequent steps to implement feasible corrections and differentiated data supply at the item granularity; on the other hand, the system state vector uniformly encodes access characteristics, time attributes and contextual resources, providing an interpretable, quantifiable and auditable input basis for subsequent joint action decisions, thereby ensuring that the present invention has feasibility and logical closed-loop under the complex operating conditions of smart buildings / smart parks.

[0057] Step S3: Input the system state vector into the decision model output buffer and acquisition joint action, and use importance classification and preset constraints to make feasibility corrections to the joint action; The joint action of inputting the system state vector into the decision model and outputting the buffer and acquisition includes: inputting the system state vector into the policy model obtained by reinforcement learning training for calculation, so as to generate and output the joint action of buffering and acquisition; The combined actions of caching and acquisition include at least prefetching decision, cache maintenance decision, and sampling back control decision. The prefetching decision is used to determine the set of entries that need to be prefetched and loaded into the cache. The cache maintenance decision is used to indicate the time-to-live (TTL) management and eviction weight of cache entries. The sampling back control decision is used to control the acquisition mode of the data source. The acquisition mode includes at least one or more of the following: sampling frequency, event trigger threshold, and reporting content format.

[0058] Feasibility modifications for joint actions using importance grading and pre-defined constraints include: Based on importance classification, rule constraints are imposed on various decisions in the joint action of caching and acquisition, and dynamic constraints are imposed based on the system resource status. Among them, according to the rules, the pre-fetching and caching of Class A key data are forcibly guaranteed, and the downgrade operation of the collection mode of Class A data is restricted; Based on dynamic constraints, when the cache capacity or edge node resource load exceeds the limit, the prefetched item set is pruned or the sampling back control decision is downgraded according to the importance level. When pruning or downgrading, it takes priority on C-class items and then on B-class items. The output is the joint action after being modified by rule constraints and dynamic constraints.

[0059] Step S3 specifically includes In step S1, the edge node has divided the processing window according to the preset window length and output a unified data stream organized in the order of the processing window identifiers. In step S2, based on the unified data stream, a cache entry with a unique identifier is generated for each piece of data in the edge node cache namespace and a cache object model is formed. At the same time, a system state vector is generated based on cache access log records, data time attributes and contextual data. The cache entries are divided into A, B and C categories according to the hierarchical rules and corresponding priority fields, freshness threshold fields and time to live (TTL) fields are set.

[0060] Based on the above inputs, the core of step S3 is: taking the system state vector as the decision input, the reinforcement learning policy model outputs a "candidate scheme" for the joint action of caching and acquisition, and then combines the A / B / C importance classification of S2 with the system resource status of S1 (including at least cache capacity and edge node resource load) to perform rule constraints and dynamic constraints on the feasibility correction of the candidate scheme, forming a "final joint action" that can be directly executed by step S4, thereby realizing the coordinated optimization of "caching prefetching - TTL management - sampling back control".

[0061] In this embodiment, the processing window identifier is denoted as The cache entry identifier is denoted as The data source identifier is recorded as The system is in the window. Upon arrival, extract the state representation related to this window from the system state vector output in step S2. and will Input is a policy model obtained through reinforcement learning training. Inference is performed to obtain the original candidate outputs of the joint action.

[0062] To enable the policy output to be directly mapped to engineering actions, the joint action is defined as a triple:

[0063] in For item-level prefetch candidate vectors, Manage candidate vectors for entry-level TTL. This is a candidate vector for source-level sampling back-control (covering one or more of the following: sampling frequency, event trigger threshold, and reported content format). After candidate actions are generated, they are not executed directly, but instead enter a "constraint feasibility correction" phase: first, rule constraints based on importance grading are executed to ensure that critical data of category A are not missed; then, dynamic constraints based on system resource status are executed, and when cache capacity or edge node resource load exceeds limits, pruning or degradation is performed in the order C→B, finally outputting... For subsequent implementation.

[0064] (a) Candidate prefetching generation (strategy output + mandatory A-class completion) The strategy model applies to each candidate cache entry Output a prefetching propensity score First, the score is mapped to a candidate prefetch decision, and then A-class forced completion is performed to obtain the candidate prefetch vector. :

[0065] in: To process windows Internal cache entries Candidate prefetching decision; For the entry Class A mandatory marking, if If it is Class A, then ,otherwise ; For the strategy model of entries In the window Pre-selection tendency score; It is a natural exponential function; The floor operator is used to map continuous probabilities to... decision making.

[0066] (ii) TTL candidate update (hierarchical-access popularity-freshness coupling) In the window Internally, based on the cached access logs output by S2, the window-level access popularity index is obtained. Based on the definition of "data age / freshness threshold" in S2, the normalized value of item freshness is obtained. This adjusts the policy candidate TTL to an explicitly controllable TTL candidate value:

[0067] in: To process windows Internal entries The candidate time-to-live (TTL) value; For the entry Entering the window The current TTL value; For window The access popularity metric is obtained from statistics recorded in the cached access logs; For the entry The freshness normalization is defined in the same way as the ratio of "data age / freshness threshold" in step S2 and the window subscript is explicitly marked. For the entry The graded gain coefficients are as follows: Class A has the largest value, Class B is the second largest, and Class C has the smallest value. For the entry The penalty coefficient for losing new information is the smallest for class A, followed by class B, and the largest for class C. It is the natural logarithm function; For the truncation function, Limited to Inside; For the entry The minimum allowed TTL lower bound; For the entry The maximum allowed upper bound of TTL.

[0068] (III) Generation of Sampling Back Control Candidates and Class A Protection Gating To unify the sampling frequency, event trigger threshold, and reported content format into a unified abstraction of "collection mode strength," and to implement the "prohibition of downgrading for Class A data," the candidate collection modes of the strategy are... Applying Class A protection gating and resource pressure gating, we obtain the original sampled back-control candidates:

[0069] in: To process windows Internal data source Candidate values ​​for the intensity of the acquisition mode; The intensity of the original acquisition mode output by the strategy model; For data source Class A protection mark, if Corresponding to Category A key data otherwise ; For window The resource pressure index is calculated from the resource load index of edge nodes and contextual data such as cache usage; For window The resource security margin index is obtained by quantifying the difference between the allowable threshold and the current load. It is a natural exponential function.

[0070] (iv) Resource feasibility pruning and ranking score (explicit C → B → A protection mechanism) When applying dynamic constraints, the capacity of the candidate prefetch set needs to be pruned, with pruning taking priority for class C, followed by class B, and finally protecting class A.

[0071] Therefore, for each entry Construct the clipping sort score:

[0072] in: For window Internal entries The cropping sort score indicates that the smaller the score, the higher the priority of cropping. For the entry In the window Candidate TTLs; For the strategy model of entries Pre-selection tendency score; For the entry The importance level coding is set to positive numbers that increase sequentially for A, B, and C, respectively, so that items of category A receive the minimum. Therefore, it is less likely to be cut; It is the natural logarithm function; It is a natural exponential function.

[0073] (v) Explicit pruning and final prefetching decision output under capacity constraints (Paragraph 2: From candidate to final) Set window The available capacity of the internal cache is ,entry The estimated capacity to be occupied after prefetching is ,in This can be calculated from the number of serialized bytes or the encoded length of the cached entry's data payload field. First, a candidate prefetch set is formed. If the capacity constraint is met, it passes directly; if the limit is exceeded, it is processed according to... The non-A category items are pruned sequentially from smallest to largest until the capacity constraint is met, resulting in the final prefetching decision:

[0074] in: To process windows Internal entries The final prefetch decision; For candidate prefetching decision; This is an indicator function; it returns 1 if the condition is true, and 1 otherwise. For window The set of items to be clipped. Through the according to Iterative removal in ascending order until the condition is met. .

[0075] The final combined action output and the interface to subsequent steps, after the above two-stage processing, yield the final combined action:

[0076] in From (5), The output can be taken as (II). And in Apply no less than on class entries The lower limit protection is used to achieve "cache residency". Obtained from (iii), and further processed according to B / C type data sources when resource limits are exceeded. and Triggering a downgrade.

[0077] Therefore, the output of step S3 is This can be directly parsed into "collection instructions and caching instructions" in step S4: the prefetch set corresponds to the set of entries that need to be pre-acquired and loaded into the cache; TTL management corresponds to the time-to-live (TTL) update and eviction weight basis of the cached entries; sampling back control corresponds to the control parameters of the data source sampling frequency, event trigger threshold, and reported content format. Since this step takes the prefetching and retention of Class A key data as a hard rule and prioritizes the pruning of Class C and then Class B under resource constraints, it can avoid the risk of key data omission or system overload that may be caused by the pure learning strategy in the network fluctuation and load surge scenarios of smart buildings / smart parks. This lays a stable and implementable execution foundation for the subsequent "edge processing and cache update, hierarchical data supply and feedback adaptive closed loop".

[0078] Step S4: Execute the acquisition and caching instructions in the joint action after feasibility correction, perform edge processing and cache update on the acquired data, and realize hierarchical data supply; The process of executing the acquisition and caching instructions in the joint action after feasibility correction, performing edge processing and cache updates on the acquired data, and realizing hierarchical data supply includes: parsing and executing the acquisition and caching instructions in the corrected joint action to obtain the corresponding data; performing edge computing processing on the acquired data, and writing the processing results or the original data verified by preset quality rules as the data payload into the corresponding cache entry in the cache object model to complete the cache update; Based on the importance classification of cached entries, a differentiated strategy corresponding to the A, B, and C classifications is adopted to respond to data requests and report data to the cloud, thereby achieving tiered data supply.

[0079] Step S4 specifically includes: In step S3, the edge nodes have output the combined action after being corrected by rule constraints and dynamic constraints. This includes at least prefetching decisions, cache maintenance decisions, and sampling control decisions, and has ensured the prefetching and cache residency of corresponding entries for Class A key data. At the same time, it has completed the pruning or degradation of Class B and Class C objects when the cache capacity or edge node resource load exceeds the limit.

[0080] Therefore, step S4 in this embodiment follows the execution thread of "action parsing—data acquisition—edge processing—quality gating—cached update—tiered supply": First, the modified joint action is structurally parsed and broken down into directly implementable acquisition instructions and cache instructions; then, acquisition operations such as periodic sampling, event trigger threshold adjustment, or reporting content format switching are performed on the sensing device and business system according to the acquisition instructions, and active acquisition is performed on the pre-fetched entries according to the cache instructions; after the acquired data enters the edge node, edge computing processing is performed on the data, and writing gating is performed based on preset quality rules; finally, the processing result or the original data verified by the quality rules is written as the data payload into the corresponding cache entry in the cache object model to complete the cache update, and data is reported to the cloud in response to data requests based on the importance classification of A / B / C categories, thereby realizing tiered data supply.

[0081] (1) Joint action analysis and instruction arrangement In the processing window At the beginning, the action execution module of the edge node reads... The combined actions are mapped into two sets of instructions: acquisition instruction set. With cache instruction set Among them, the collection instruction set For data sources (including interfaces between sensing devices and business systems), the parameters should at least include the target data source identifier, sampling frequency or sampling period, event trigger threshold, and the format of the reported content. Cached instruction set For a cached entry set, it includes at least a prefetched entry set, an entry time-to-live (TTL) update value, and records or update information related to eviction weights. This parsing process follows the cached entry identifier and field system formed in step S2, ensuring that each cache instruction can locate a unique cached entry in the cached object model, thereby making the joint action directly implementable and providing a traceable execution basis for the subsequent "data acquisition-processing-writing" chain.

[0082] (2) Acquisition command execution and prefetch data acquisition path For sampling frequency-based acquisition commands, edge nodes write the new sampling period parameter into the configuration register of the corresponding sensor device or the acquisition agent through the protocol adaptation layer to shorten or extend the sampling interval. For event trigger threshold-based acquisition commands, edge nodes synchronize the threshold parameter to the trigger rule modules of event sources such as access control, security, and maintenance, so that they generate alarm events or status change events with the new threshold in subsequent windows. For acquisition commands that switch the reported content format, edge nodes select the raw data reporting, window aggregation reporting, or feature value reporting mode on the acquisition side to ensure that the data format is consistent with the subsequent edge processing chain. Meanwhile, for cached command sets... The data corresponding to the prefetched item set is actively acquired by edge nodes according to the "nearest-first" path: preferably pulled in real time from local directly connected devices; if the item corresponds to a cross-system business status snapshot or historical window statistics, it is queried through the business system interface or quickly constructed from the local historical window cache of the edge node; in the optional implementation of multi-edge node deployment in the park, copies of the same type of item from neighboring edge nodes can be requested through the inter-edge collaboration interface to reduce the pressure on the backhaul link. The above acquisition process retains the original timestamp, data source identifier, and processing window identifier, so that it can be naturally accepted by the unified data flow structure of "organizing output according to processing window identifier" defined in step S1, and facilitates the subsequent calculation of quality indicators and cache update fields within the window.

[0083] (3) The edge computing processing chain and data form are unified. After the acquired data enters the edge processing pipeline, the edge nodes are configured with corresponding operators for different data types: denoising and robust smoothing are performed on continuous sensor data; deduplication, temporal consistency verification and semantic normalization are performed on event-based business data; in-window aggregation calculations are performed on data that requires window statistics; and feature extraction is performed on data that requires upper-layer linkage to generate structured feature results.

[0084] To maintain consistency with the standardized processing in step S1, this embodiment preferably reuses the "missing marker" and "abnormal marker" generated by the standardized cleaning in step S1 as input elements of the processing chain. This ensures that the edge processing results not only include numerical values ​​or event entities, but also carry traceable abnormal state identifiers, thereby supporting the subsequent "quality gating - write selection - differentiated supply" to form an verifiable execution logic chain.

[0085] (4) Preset quality rule gating and writing selection To prevent low-quality raw data from entering the cached object model and affecting subsequent windowing decisions and tiered supply, this embodiment uses "preset quality rules" as the write gate. The preset quality rules cover at least three dimensions: completeness, timeliness, and reasonableness, and their calculation results are aggregated into an item-level quality score. A computable, easy-to-implement, and concise quality score expression is given below:

[0086] in: To process windows Internal cache entries The corresponding data quality score; For the entry In the window The completeness ratio score is obtained by normalizing the ratio of actual data points to expected data points, and its value range is [value range missing]. ; For the entry In the window The timeliness deviation within the window is obtained by normalizing the data arrival time relative to the window boundary and is a non-negative real number. For the entry In the window The reasonable penalty amount within is obtained by normalizing the number of outbounds, the number of jumps, or the number of abnormal flags triggered in step S1, and is a non-negative real number; It is a natural exponential function.

[0087] Based on quality scoring and item-level gating thresholds, the write pass indicator is defined as follows:

[0088] in: To process windows Internal entries The quality is indicated by a value of 0 or 1; This is an indicator function; it returns 1 if the condition is true and 0 otherwise. For the entry The corresponding minimum quality gate threshold is preferably configured according to the importance of the item, with a higher threshold for category A, a lower threshold for category B, and a more relaxed threshold for category C.

[0089] when When, raw data validated by quality rules is allowed to be written to the data payload field of a cache entry; when In this case, it is preferable to write the structured results generated by edge processing into the data payload field, and write the missing or abnormal markers together to ensure that the data in the cache is semantically available and traceable.

[0090] The key technical point of this gating strategy is that it does not simply discard low-quality data, but makes a computable choice between "writing raw data" and "writing processing results". In this way, even in scenarios with unstable networks, sensor jitter, or a backlog of sudden events in the business system, it can still provide a cache supply base with engineering availability for Class A / B critical businesses.

[0091] (5) Cache update and field consistency maintenance After edge processing and quality gating are completed, edge nodes are identified according to the entry identifier. Locate the corresponding cache entry in the cache object model, write the processing result or the raw data verified by quality rules into the data payload field of that entry, and synchronously update the timestamp field of that entry to reflect the data's position within the window. The latest generation or update time within; at the same time, update the Time to Live (TTL) field according to the cache maintenance decision output in step S3, and retain the priority field and freshness threshold field configured in step S2 so as not to be overwritten.

[0092] The consistency maintenance order of this field can guarantee: Firstly, subsequent freshness determination is consistently performed based on the timestamp field and the freshness threshold field; Secondly, the engineering constraint of step S3, "mandatory retention of Class A key data", can be implemented through the protective value of the TTL field; Third, the priority field of cached entries is consistent with the importance classification, thus providing a directly callable field basis for subsequent graded supply strategies.

[0093] 6) Tiered data supply and cloud reporting strategy When the upper-level application is in the window When an edge node initiates a data request, it first locates the target cache entry in the cache object model and determines its freshness by combining the timestamp field and the freshness threshold field. If the cache is hit and the freshness threshold is not exceeded, the data payload is returned directly; if the threshold is exceeded or the cache is not hit, the corresponding data acquisition is triggered according to the sampling back control decision in step S3 or the system waits for the next window update.

[0094] Differentiated supply and reporting strategies are adopted for different importance levels: Category A critical data preferably adopts a parallel strategy of event-triggered rapid reporting and edge dwell to support low-latency linkage in scenarios such as fire alarms and critical equipment failures; Category B control linkage data preferably reports its edge processing results in batches according to the processing window period or when the change exceeds the threshold, so as to balance control real-time performance and backhaul link burden; Category C general monitoring data preferably reports window aggregation results or anomaly summaries as needed for statistical reports and trend analysis, reducing redundant backhaul.

[0095] Thus, this step realizes a closed-loop execution chain from step S3 "joint action after feasibility correction" to step S4 "acquisition-prefetching-processing-gating-writing-supply", enabling clear and observable improvement paths for indicators such as cache hit rate, average response latency and backhaul data volume, and providing a reproducible data foundation for the subsequent step S5 feedback indicator calculation and online learning update.

[0096] Step S5: Evaluate the effectiveness of the tiered data supply to obtain feedback indicators, and update the parameters of the decision-making model based on the feedback indicators to form an adaptive optimization closed loop; The evaluation of the effectiveness of tiered data supply yields feedback indicators, and the parameters of the decision-making model are updated based on these indicators to form an adaptive optimization closed loop, including: Based on the operational effect of hierarchical data supply, and combined with the cache access log records and contextual data of the cache object model, a set of feedback indicators is calculated. The set of feedback indicators includes at least cache hit rate, average response latency, backhaul data volume, edge node resource load, and freshness compliance rate of Class A key data. The set of feedback indicators is transformed into reward signals or loss function inputs for updating the decision model, and the parameters of the decision model are updated using an online learning method based on the reward signals or loss function inputs. When the set of feedback metrics meets the preset degradation conditions, a rollback mechanism is triggered to restore the parameters to historical stable parameters or switch to a safety net strategy based on business rules, thereby forming an adaptive optimization closed loop driven by feedback metrics.

[0097] Step S5 specifically includes: By the end of step S4, the edge nodes have provided differentiated data supply based on the A / B / C importance classifications formed in step S2, and have updated the data payload, timestamp, priority, freshness threshold, and time-to-live (TTL) fields of the corresponding cache entries in the cache object model. Simultaneously, the edge nodes continuously record cache access logs and retain contextual data consistent with the processing window identifier in the unified data stream. Step S5, as the final step of this method, uses the processing window... To assess and update the basic cycle, a quantitative evaluation of "tiered data supply - cache operation - resource status" is conducted, and the evaluation results are transformed into online learning input for the decision model (strategy model). When a degradation of the operating indicators is detected, a rollback mechanism is triggered to restore the parameters to historical stable parameters or switch to a safety net strategy based on business rules, thereby forming a feedback indicator-driven adaptive optimization closed loop.

[0098] (1) Feedback data collection and evaluation window organization In each processing window At the end, the edge nodes aggregate the raw records used for evaluation from three types of data sources: One is the cache access log recording of the cache object model, which is used to characterize cache hit and response performance, and includes at least the request arrival time, hit flag, response completion time, and the number of bytes returned when a miss occurs; Secondly, there is contextual data, which is used to characterize network performance indicators and edge node resource load indicators. This contextual data is consistent with the processing window identifier when generating the unified data stream in step S1, thereby ensuring the consistency of the spatiotemporal scope of indicator calculation. Thirdly, there are the field information for the cached entries corresponding to Class A key data, including the timestamp field and the freshness threshold field, which are used to determine whether the key data meets the freshness constraints allowed by the business within the window.

[0099] The above aggregation uses the method of "merging by processing window identifier" to organize data, so that the feedback indicators in the same window can correspond one-to-one with the joint actions generated and executed in step S3 in that window, which satisfies the "state-action-feedback" ternary association basis required for online learning.

[0100] (2) Calculation of feedback indicator set To ensure that feedback metrics are calculable and directly applicable, this embodiment uses a window... Internal construction request set and the A-class cache entry set It calculates a set of metrics including at least cache hit rate, average response latency, data return volume, edge node resource load, and the freshness compliance rate of Class A key data. Cache hit rate:

[0101] in: To process windows Cache hit rate within the cache; To process windows The cached access request set within; For set The number of requests in; For the request In the window The hit indicator value is set to 1 if a hit occurs, otherwise it is set to 0.

[0102] Average response time:

[0103] in: To process windows Average response time within; For the request In the window The arrival timestamp (derived from cached access log records); For the request In the window The response completion timestamp (derived from cached access log records).

[0104] Data volume returned:

[0105] in: To process windows The amount of data returned within the system; For the request The number of data bytes returned by the upstream node or the cloud when a match is missed; This is a hit indicator used to ensure that only missed requests are accumulated with the return volume. Edge node resource load:

[0106] in: To process windows Resource load metrics for edge nodes within the system; For window The set of resource dimensions that participate in load assessment; For resource dimensions In the window The normalized occupancy value is taken from the edge node resource load index in the contextual data and normalized to [value]. ; This refers to the number of resource dimensions.

[0107] Category A Key Data Freshness Compliance Rate:

[0108] in: To process windows The freshness compliance rate of key data in Category A; To process windows Internal Class A cache entry set; For identifying cache entries; To process windows The timestamp used for the freshness check at the end of the assessment; For cache entries In the window The update timestamp within is taken from the timestamp field of the cached entry; For cache entries The corresponding freshness threshold field value is taken from the freshness threshold field of the cached entry; This is an indicator function; it takes the value 1 if the condition is true, and 0 otherwise.

[0109] (3) Construction of reward signal / loss function input and online learning update To transform the set of feedback metrics into online learning inputs usable for the policy model, this embodiment constructs a window-level reward signal. It can be used as the reward input for reinforcement learning or equivalently as the inverse input to the loss function (e.g., minimizing). ).

[0110] The reward is constructed as follows:

[0111] in: To process windows The reward signal; It is the natural logarithm function; To avoid extremely small positive constants with a denominator of zero; For cache hit rate; This represents the average response time. For the amount of data to be returned; This refers to the resource load metric for edge nodes. The reward signal is designed to achieve the "freshness compliance rate of Category A key data". The rationale behind this reward signal is as follows: First, it couples the hit rate with latency, avoiding the introduction of unreasonable queuing latency by simply increasing the hit rate; second, it applies a logarithmic penalty to the backhaul volume, prompting the strategy to reduce its reliance on the cloud when the network is limited; third, it uses a quadratic term to apply a stronger penalty to high resource load intervals, encouraging the strategy to downgrade Category B / C actions when resources are scarce; fourth, it uses a fractional logarithmic form to... Nonlinear amplification is applied to ensure that the strategy model prioritizes the freshness of Class A key data in the update direction, which meets the real-time requirements of smart building / park security alarms and key fault data.

[0112] Subsequently, the edge node, at the end of each window, with the window... The system state vector and corresponding reward signal within the system. To provide input for online learning, the parameters of the strategy model in step S3 are incrementally updated. The updated parameters are then used in the next window to generate new cache and acquisition joint actions, thereby completing the closed-loop connection.

[0113] (4) Degradation conditions and regression mechanism Since online learning may experience short-term fluctuations or even strategy degradation in complex environments, this embodiment sets preset degradation conditions and triggers a rollback mechanism to ensure that the present invention can operate stably in engineering sites.

[0114] Specifically, monitor the changing trend of the set of feedback indicators within several consecutive processing windows: if the freshness compliance rate of Category A appears... Continuously below the preset lower limit, or edge node resource load Continuously exceeding the safety limit or average response time In return volume If there are situations such as a significant increase while the value increases, then the degradation conditions are met and the rollback mechanism is triggered.

[0115] The preferred rollback mechanism includes two equivalent implementations: First, restore the strategy model parameters to their historical stable parameters. Historical stability parameters are those used within the previous stable operating range. Meets the standards and A snapshot of parameters that have not exceeded the limits; Secondly, directly switch to a backup strategy based on business rules. The backup strategy is consistent with the importance classification in step S2, that is, to force the pre-fetching and caching of A-class items, and to prioritize the pruning or sampling downgrade of C-class items when resources exceed the limit.

[0116] Through this rollback mechanism, step S5 provides a safety barrier while completing the online update, ensuring that the "updated strategy model parameters or rolled-back parameters / strategy selection" output by this method as the last step can be stably fed back to step S3 in the next window, thereby realizing an adaptive optimization closed loop driven by feedback indicators and with engineering usability.

[0117] Example 2 A system employing a data acquisition method based on edge computing and intelligent caching strategies is characterized by the following features.

[0118] Multi-source acquisition and alignment module: Acquires multi-source data and operating context, performs time window alignment and standardization processing on the multi-source data and operating context, and generates a unified data stream; Cache modeling and grading module: Constructs cache object models and system state vectors based on unified data flow, and classifies the importance of data in the cache object models according to business rules; Joint Decision Constraint Module: Inputs the system state vector into the decision model output buffer and collects joint actions, and uses importance classification and preset constraints to modify the feasibility of joint actions; Edge processing supply module: Executes the acquisition and caching instructions in the joint action after feasibility correction, performs edge processing and cache update on the acquired data, and realizes hierarchical data supply; Feedback learning closed-loop module: The effectiveness of hierarchical data supply is evaluated to obtain feedback indicators, and the parameters of the decision model are updated based on the feedback indicators to form an adaptive optimization closed loop.

[0119] The technical features of this invention not described can be implemented by or using existing technology, and will not be repeated here. Of course, the above description is not a limitation of this invention, and this invention is not limited to the examples above. Any changes, modifications, additions or substitutions made by those skilled in the art within the scope of this invention should also be within the protection scope of this invention.

Claims

1. A data acquisition method based on edge computing and intelligent caching strategies, characterized in that, Includes the following steps: Collect multi-source data and operating scenarios, perform time window alignment and standardization processing on the multi-source data and operating scenarios, and generate a unified data stream; Based on the unified data flow, a cache object model and a system state vector are constructed, and the data in the cache object model is classified according to importance based on business rules; The system state vector is input into the decision model output buffer and acquisition joint action, and the feasibility of the joint action is modified by the importance classification and preset constraints; The acquisition and caching instructions in the joint action after the feasibility correction are executed to perform edge processing and cache update on the acquired data, thereby achieving hierarchical data supply. The effectiveness of the hierarchical data supply is evaluated to obtain feedback indicators, and the parameters of the decision model are updated based on the feedback indicators to form an adaptive optimization closed loop.

2. The data acquisition method based on edge computing and intelligent caching strategy according to claim 1, characterized in that, The collection of multi-source data and operating context includes: using an edge gateway or edge server as an edge node to collect physical sensor data and business event data from connected sensing devices and business systems, and collecting contextual data to characterize the system operating status from the edge node itself and its network interface. The physical sensing data includes environmental status monitoring data, equipment operating parameters and energy consumption metering data; the business event data includes status change events and alarm events generated by security, access control and operation and maintenance systems; and the contextual data includes spatial location identifiers, time period labels, area occupancy levels, network performance indicators and edge node resource load indicators.

3. The data acquisition method based on edge computing and intelligent caching strategy according to claim 2, characterized in that, The step of aligning and standardizing the multi-source data with the operating context using time windows to generate a unified data stream includes: Set a preset window length and divide the processing window accordingly, and assign a unified processing window identifier to the physical sensing data, the business event data and the contextual data; align the physical sensing data, the business event data and the contextual data from different data sources and with different native timestamps into the same processing window according to the correspondence between their timestamps and the processing window identifiers. Perform standardized cleaning and formatting transformation on data within the same processing window. The standardized cleaning includes filling in missing data and identifying, correcting or marking abnormal data. The formatting transformation includes converting the data into a uniform structure with predetermined fields and types. The data, after being aligned and standardized by the time window, is organized and output according to the processing window identifier order to form the unified data stream consisting of multiple consecutive processing window data.

4. The data acquisition method based on edge computing and intelligent caching strategy according to claim 3, characterized in that, Constructing a cache object model and system state vector based on the unified data flow includes: Based on each piece of data in the unified data stream, a cache entry with a unique identifier is generated in the cache namespace of the edge node, and a cache object model is formed using the cache entry. The cached entries include at least a data payload field, a timestamp field, a priority field, a freshness threshold field, and a time-to-live (TTL) field. Simultaneously, based on the cached access log records, data time attributes, and the contextual data in the unified data stream, a system state vector is generated that includes multiple dimensions, including at least a data access characteristic dimension, a data time attribute dimension, and a resource and context dimension.

5. The data acquisition method based on edge computing and intelligent caching strategy according to claim 4, characterized in that, Implementing importance grading for data in the cached object model according to business rules includes: The cache entries are analyzed and classified according to predefined hierarchical rules associated with business security and real-time requirements. The hierarchical rules identify data entries involving security alarms and critical faults as category A, data entries used for real-time device control and system linkage as category B, and data entries used for environmental monitoring and statistical analysis as category C. Based on the classification results, the highest priority field value and the lowest freshness threshold field value are set for cache entries classified as A, the medium priority field value and the freshness threshold field value determined according to the control period are set for cache entries classified as B, and the basic priority field value and the larger freshness threshold field value are set for cache entries classified as C.

6. The data acquisition method based on edge computing and intelligent caching strategy according to claim 5, characterized in that, The step of inputting the system state vector into the decision model and outputting the combined action of buffering and acquisition includes: inputting the system state vector into the policy model obtained by reinforcement learning training for calculation, so as to generate and output the combined action of buffering and acquisition; The caching and acquisition joint action includes at least prefetching decision, cache maintenance decision and sampling reverse control decision; the prefetching decision is used to determine the set of entries that need to be prefetched and loaded into the cache, the cache maintenance decision is used to indicate the time-to-live (TTL) management and eviction weight of cache entries, and the sampling reverse control decision is used to control the acquisition mode of the data source, the acquisition mode includes at least one or more of sampling frequency, event trigger threshold and reporting content format.

7. The data acquisition method based on edge computing and intelligent caching strategy according to claim 6, characterized in that, The feasibility correction of the joint action using the importance classification and preset constraints includes: Based on the importance classification, rule constraints are applied to each decision in the joint action of caching and acquisition, and dynamic constraints are applied based on the system resource status. In particular, according to the aforementioned rules, the pre-fetching and caching of Class A key data are forcibly guaranteed, and the downgrade operation of the collection mode of Class A data is restricted. According to the dynamic constraints, when the cache capacity or edge node resource load exceeds the limit, the prefetched item set is pruned or the sampling reverse control decision is downgraded according to the importance classification. When pruning or downgrading, it takes priority on C-class items and then on B-class items. The combined action after being modified by the rule constraints and the dynamic constraints is output.

8. The data acquisition method based on edge computing and intelligent caching strategy according to claim 7, characterized in that, The process of executing the acquisition and caching instructions in the modified joint action to perform edge processing and cache updates on the acquired data and achieve hierarchical data supply includes: parsing and executing the acquisition and caching instructions in the modified joint action to acquire corresponding data; performing edge computing processing on the acquired data and writing the processing result or the original data verified by preset quality rules as the data payload into the corresponding cache entry in the cache object model to complete the cache update; Based on the importance classification of the cached entries, a differentiated strategy corresponding to the A, B, and C classifications is adopted to respond to data requests and report data to the cloud, thereby realizing the classified data supply.

9. The data acquisition method based on edge computing and intelligent caching strategy according to claim 8, characterized in that, Evaluating the effectiveness of the tiered data supply to obtain feedback indicators, and updating the parameters of the decision model based on the feedback indicators to form an adaptive optimization closed loop, includes: Based on the operational effect of the hierarchical data supply, combined with the cache access log records of the cache object model and the contextual data, a set of feedback indicators is calculated. The set of feedback indicators includes at least the cache hit rate, average response latency, backhaul data volume, edge node resource load, and freshness compliance rate of Class A key data. The set of feedback indicators is transformed into a reward signal or loss function input for updating the decision model, and the parameters of the decision model are updated using an online learning method based on the reward signal or loss function input. When the set of feedback metrics meets the preset degradation conditions, a rollback mechanism is triggered to restore the parameters to historical stable parameters or switch to a safety net strategy based on business rules, thereby forming an adaptive optimization closed loop driven by feedback metrics.

10. A system employing the data acquisition method based on edge computing and intelligent caching strategies as described in any one of claims 1-9, Its characteristics are as follows. Multi-source acquisition and alignment module: Acquires multi-source data and operating context, performs time window alignment and standardization processing on the multi-source data and operating context, and generates a unified data stream; Cache modeling and grading module: Constructs a cache object model and system state vector based on the unified data flow, and performs importance grading on the data in the cache object model according to business rules; Joint decision constraint module: Inputs the system state vector into the decision model output buffer and collects joint actions, and uses the importance classification and preset constraints to perform feasibility correction on the joint actions; Edge processing supply module: Executes the acquisition and caching instructions in the joint action after feasibility correction, performs edge processing and cache update on the acquired data, and realizes hierarchical data supply; Feedback learning closed-loop module: Evaluate the effectiveness of the hierarchical data supply to obtain feedback indicators, and update the parameters of the decision model based on the feedback indicators to form an adaptive optimization closed loop.