Multi-tenant dynamic data source isolation system for medicine SaaS platform
By using multi-dimensional monitoring and LSTM model prediction, resources are dynamically scheduled, solving the problem of physical disk contention in multi-tenant data isolation of pharmaceutical SaaS platforms. This achieves efficient data isolation and resource utilization, ensuring data security and performance stability.
Patent Information
- Application Number
- CN202511551814.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-28
- Publication Date
- 2026-02-27
AI Technical Summary
Existing multi-tenant data isolation solutions for pharmaceutical SaaS platforms cannot effectively avoid physical disk contention under high load, leading to performance bottlenecks and data security risks. They also lack dynamic analysis of tenant I/O behavior and intelligent adjustment of resource scheduling strategies, failing to meet real-time and stability requirements.
By collecting and extracting features from multi-dimensional monitoring data, a tenant I/O behavior profile is constructed. The LSTM model is used for load prediction, and dynamic resource scheduling and optimization are performed based on the prediction results to achieve effective isolation and utilization of physical disk resources.
It achieves effective isolation of multi-tenant data, avoids data leakage and performance bottlenecks, improves disk utilization and overall performance, ensures data security and business stability, and supports real-time data analysis and decision-making.
Smart Images

Figure CN121579148A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of pharmaceutical SaaS platform technology, specifically to a multi-tenant dynamic data source isolation system for pharmaceutical SaaS platforms. Background Technology
[0002] With the development of digital information construction in the pharmaceutical industry, pharmaceutical SaaS platforms provide chain pharmacy groups with convenient and efficient management solutions. Chain pharmacy groups typically have numerous stores, each operating as an independent tenant, sharing the same pharmaceutical SaaS platform for daily business operations. The dynamic data source isolation technology used generates and manages their respective drug inventory data, sales data, membership data, etc., ensuring data security while improving resource utilization.
[0003] However, existing multi-tenant data isolation solutions generally have the following technical defects: On the one hand, most existing solutions assume that the underlying physical resources (such as disk I / O) are unlimited and stable. In reality, multiple logically isolated tenant data sources may be deployed on shared physical disks. When multiple tenants of a chain pharmacy perform high-load data operations such as sales settlement and inventory synchronization during morning and evening peak hours, intense physical disk I / O competition will occur, causing a sharp increase in disk seek time and rotational latency. This competition destroys the performance isolation between tenants, so that the high I / O load of one tenant will directly slow down the response speed of other tenants, and the service quality cannot be guaranteed. On the other hand, existing operation and maintenance monitoring systems typically only issue alerts after disk I / O bottlenecks have already occurred and users experience performance degradation. At this point, measures such as resource expansion and data migration are "post-hoc remedies," which are delayed and cannot meet the high real-time and stability requirements of the pharmaceutical business. They lack the ability to analyze tenant I / O behavior patterns and predict future resource bottlenecks. Furthermore, traditional resource scheduling strategies are usually static or based on simple instantaneous threshold triggers, failing to make intelligent and refined adjustments based on tenants' unique, time-varying behavioral characteristics, and thus cannot allocate appropriate physical resources and scheduling priorities.
[0004] For example, application number CN202410946517.3 discloses a dynamic data isolation method and system based on multiple data sources. By constructing an isolation policy decision matrix based on tenant attributes and access pattern characteristics, and generating an isolation policy based on the matrix, the method achieves isolation of data from different tenants. It comprehensively utilizes technologies such as multi-tenant attribute partitioning, access pattern analysis, and dynamic adjustment of isolation policies to achieve dynamic isolation and access control of multi-tenant data, thereby improving the system's security, privacy protection capabilities, adaptability, and maintainability. However, it has shortcomings such as neglecting the competition for underlying physical disk resources, passive response and lack of foresight in data source isolation, and rigid scheduling policies.
[0005] Existing technologies have the following shortcomings: Current data isolation methods often employ independent databases, shared databases with independent schemas, or shared databases with shared schemas, focusing on logical-level data isolation and access control while neglecting the micro-state of the underlying physical disk. In a multi-tenant environment, the I / O operations of different tenants will have varying degrees of impact on the physical disk. When multiple tenants perform a large number of read and write operations simultaneously, it can easily lead to performance bottlenecks such as increased read and write latency and decreased IOPS (Input / Output Operations Per Second) on the physical disk. This makes it difficult to effectively cope with complex and ever-changing I / O operation patterns and resource contention issues, and it is impossible to dynamically adjust according to the actual I / O behavior of tenants and system load, thereby affecting the overall performance and data security and reliability of the pharmaceutical SaaS platform.
[0006] The information disclosed in the background section is only intended to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0007] The purpose of this invention is to provide a multi-tenant dynamic data source isolation system for a pharmaceutical SaaS platform. This invention achieves effective isolation of multi-tenant dynamic data sources and optimized utilization of physical disk resources through steps such as multi-dimensional monitoring data collection and feature extraction, tenant I / O behavior profiling and peak prediction, prediction-based dynamic data scheduling and resource pre-allocation, and closed-loop feedback and model optimization, thereby solving the problems in the background technology mentioned above.
[0008] To achieve the above objectives, the present invention provides the following technical solution: a multi-tenant dynamic data source isolation system for a pharmaceutical SaaS platform, comprising a multi-dimensional monitoring data acquisition and processing module: embedding a tenant context-aware probe in the data access driver layer of the pharmaceutical SaaS platform to capture each I / O request and extract multiple data information; simultaneously, deploying a physical resource monitoring agent in the operating system layer to obtain physical disk performance indicators; and then using a data association engine to associate and fuse multiple data information and physical disk performance indicators to generate a set of associated data records of tenant-operation-physical impact. Tenant Behavior Analysis and I / O Load Peak Prediction Module: Based on the associated data record set, the module uses the unsupervised learning clustering K-means algorithm to analyze feature data, generates a dynamically updated I / O behavior profile file for each tenant, uses the historical I / O load time series data of each tenant, and combines external event features to input the LSTM model for training, outputs the predicted I / O load curve for each tenant in a specific future time window, and overlays the predicted I / O load curves of all tenants at each time point to generate a tenant behavior profile library and a system-level I / O load prediction report; Resource dynamic scheduling decision execution module: After receiving the system-level I / O load prediction report, it uses the intelligent scheduler to start the decision process, selects the optimal strategy from a predefined scheduling strategy library, records the strategy execution results, and generates a scheduling execution feedback report. The performance evaluation feedback optimization strategy module compares the resource scheduling execution before and after the scheduling execution based on the scheduling execution feedback report, quantitatively calculates the performance gain and cost loss evaluation results after resource scheduling, and then uses the complete data sequence associated with the evaluation results as new training samples to retrain the LSTM model, while optimizing the scheduling strategy library.
[0009] Optionally, the extraction steps for the multiple data information are as follows: Embed tenant context-aware probes in the data access-driven layer of the pharmaceutical SaaS platform to monitor and capture every I / O request; Extract multiple data items from the captured I / O requests, including tenant ID, operation timestamp, read / write operation type, data size, target logical data source identifier, and application layer response time. Multiple data items are formatted into a single structured record in JSON or Protocol Buffer format, forming a tenant-level I / O operation pipeline.
[0010] Optionally, the steps for obtaining the physical disk performance metrics are as follows: Deploy a physical resource monitoring agent at the operating system layer of the pharmaceutical SaaS platform. The physical resource monitoring agent is started at the operating system layer and configured with a sampling interval. The physical resource monitoring agent reads raw kernel statistics data at the beginning of each sampling interval by calling the disk controller interface and the operating system kernel interface; The physical resource monitoring agent uses the raw data from the two sampling points to calculate the physical disk read / write queue length, read / write operations per second (IOPS), average read / write latency, and disk utilization percentage, and then collects and records the data to obtain physical disk performance metrics. The calculated physical disk performance metrics are formatted as a record and stored in the performance metrics database.
[0011] Optionally, the steps for generating the associated data record set are as follows: The data association engine receives tenant-level I / O operation pipeline records from the tenant context-aware probe and disk performance metric records from the physical resource monitoring agent, and aligns the two data streams to the same time window based on the timestamp. For each I / O operation record, the data association engine uses its target logical data source identifier to query the pre-configured "logical data source-physical disk location mapping table" to determine the physical disk device ID corresponding to the logical data source; Based on the operation timestamp of the I / O operation record and the physical disk device ID, find the disk performance record with the matching time in the physical disk performance metrics; The I / O operation records are associated and merged with the matching physical disk performance records to generate a "tenant-operation-physical impact" associated data record; All related data records are aggregated into a related data record set and output to distributed storage or message queue for use by subsequent tenant behavior analysis and I / O load peak prediction modules.
[0012] Optionally, the steps for generating and dynamically updating the I / O behavior profile file are as follows: Extract I / O operation characteristic data for each tenant from the associated data record set, including the frequency of I / O operations within the time window, the average number of bytes per I / O operation, the temporal pattern of operation distribution in each hour of the day, and the ratio of read / write operation types; The extracted I / O operation feature data is standardized using the Z-score standardization algorithm to obtain standardized feature data. The K-means unsupervised learning clustering algorithm is used to cluster the standardized feature data, and the optimal number of clusters is determined. Each tenant is assigned a category label representing the type of behavior pattern. Generate an initial I / O behavior profile file for each tenant, including quantitative characteristics such as the category, historical load baseline, and activity time patterns; As new related data records are continuously generated, a sliding time window is set to periodically repeat cluster analysis. An incremental learning approach is used to update the K-means clustering model and the I / O behavior profile file of each tenant, triggering re-clustering to monitor the drift of tenant behavior patterns.
[0013] Optionally, the I / O load prediction steps of the LSTM model are as follows: Historical I / O load time-series data for each tenant is extracted from the associated data record set and normalized. At the same time, external event features such as holidays, promotional activities and weather factors are collected, encoded, and sequence sample data is generated. The normalized sequence sample data is divided into training set, validation set and test set using the sliding window method. A Long Short-Term Memory (LSTM) network model consisting of an input gate, a forget gate, an output gate, and cell states is constructed. The training set data is input into the LSTM model, and the model is trained by combining external event features. The LSTM model minimizes the prediction error through backpropagation and gradient descent algorithms. The performance of the LSTM model is evaluated using validation set data, and the parameters of the LSTM model weights and biases are adjusted based on the evaluation results. Using a trained LSTM model, inputting historical I / O load time series data and external event features from the most recent time step, outputting the predicted value for a specific future time step, thus obtaining the predicted I / O load curve for each tenant within a specific future time window.
[0014] Optionally, the steps for generating the tenant behavior profile library and the system-level I / O load prediction report are as follows: The I / O behavior profile files of each tenant are aggregated to form a tenant behavior profile library. This tenant behavior profile library is a queryable and controllable database with a hierarchical storage structure and supports profile history tracing and rollback. First, obtain the I / O load forecast curves of all tenants in the same time period, and then superimpose the I / O load forecast curves of all tenants at each time point to obtain the entire system-level I / O load forecast curve. Peak detection is performed based on the system-level I / O load prediction curve to identify the peak intensity, duration and frequency of occurrence during peak load periods, and the severity of the peak is assessed based on the historical load baseline. The system compiles prediction results of peak periods and severity of system-level I / O load, automatically generates a system-level I / O load prediction report, and visualizes system-level load heatmaps, peak distribution maps, and bottleneck disk rankings. Different alarm thresholds are set according to the severity of the assessment, and system-level I / O load prediction reports are automatically sent to administrators.
[0015] Optionally, the predefined scheduling strategy library includes strategies for adjusting I / O priorities for minor bottlenecks and initiating online data migration for medium to severe bottlenecks.
[0016] Optionally, the quantitative calculation steps for the evaluation results are as follows: Extract the predicted peak periods before and after resource scheduling execution from the scheduling execution feedback report, monitor the actual I / O load indicators and predicted values of physical disks in real time during the predicted peak periods, and obtain cost loss data during the resource scheduling process. The predicted peak period is divided into time slices of equal length, and the average I / O latency, IOPS, and disk utilization are calculated within each time slice. Calculate the absolute and relative errors between the statistical forecast and the actual value, and calculate the forecast accuracy index before and after scheduling; The throughput performance gain and data migration cost loss after resource scheduling are quantitatively evaluated, and a weighted scoring method is used to comprehensively analyze the throughput performance gain and data migration cost loss to calculate the overall benefits and obtain the final evaluation results.
[0017] A computer device includes: a memory / readable storage medium and a processor; the memory / readable storage medium stores a computer program, and the processor executes the computer program to implement the steps of the above-described multi-tenant dynamic data source isolation system for a pharmaceutical SaaS platform.
[0018] The technical effects and advantages provided by the present invention in the above technical solution are as follows: This invention proactively avoids I / O contention by performing multi-dimensional monitoring of I / O requests and dynamic scheduling of physical resources. It achieves effective isolation of multi-tenant data at the underlying physical disk level, strictly separating data across different stores, avoiding the risk of data leakage and unauthorized access, and ensuring tenant data security and privacy. Through real-time monitoring of the physical disk's micro-state data and accurate prediction of tenant I / O behavior profiles, it can proactively identify and resolve physical disk performance bottlenecks. Before predicting peak disk load, the system automatically adjusts tenant I / O priorities or performs data migration, transferring data from high-load tenants to low-load disks, thereby balancing disk load and improving overall disk performance and utilization. By optimizing physical disk resource utilization, the system reduces hardware upgrade and maintenance costs caused by disk performance bottlenecks. Simultaneously, based on the severity of predictions and tenant behavior profiles, it intelligently selects the most suitable scheduling strategy, achieving refined resource management and on-demand allocation. This ensures the performance of critical business operations while improving overall resource utilization. Furthermore, by continuously learning and adapting to changes in tenant I / O behavior and system load, the system continuously optimizes prediction accuracy and the effectiveness of scheduling strategies. While achieving data isolation, the system ensures that the group headquarters can obtain accurate and timely data through the pharmaceutical SaaS platform for comprehensive business analysis and decision-making, thus meeting the needs for data aggregation and analysis from various stores. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0020] Figure 1This is a block diagram of the multi-tenant dynamic data source isolation system of the pharmaceutical SaaS platform of this invention.
[0021] Figure 2 This is a flowchart of the multi-tenant dynamic data source isolation method for the pharmaceutical SaaS platform of the present invention. Detailed Implementation
[0022] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that the description of this disclosure will be more complete and fully convey the concept of the exemplary embodiments to those skilled in the art.
[0023] Example This invention provides, for example Figure 1 The system described is a multi-tenant dynamic data source isolation system for a pharmaceutical SaaS platform. It includes a multi-dimensional monitoring data acquisition and processing module: a tenant context-aware probe is embedded in the data access driver layer of the pharmaceutical SaaS platform to capture each I / O request and extract multiple data information, including tenant ID, operation timestamp, read / write operation type, data volume, target logical data source identifier, and application layer response time, forming a tenant-level I / O operation pipeline. At the same time, a physical resource monitoring agent is deployed in the operating system layer of the pharmaceutical SaaS platform to obtain physical disk performance indicators by calling the disk controller interface and the operating system kernel, including physical disk read / write queue length, read / write operations per second (IOPS), average read / write latency, and disk utilization percentage. Then, a data association engine is used to associate and fuse multiple data information and physical disk performance indicators to generate a "tenant-operation-physical impact" associated data record set. Specifically, the steps for extracting multiple data information are as follows: Embed tenant context-aware probes in the data access-driven layer of the pharmaceutical SaaS platform to monitor and capture every I / O request; Extract multiple data items from the captured I / O requests, including extracting a unique tenant ID from the context of each I / O request; Record the precise time point when an I / O request occurs and generate an operation timestamp; Determine whether each I / O request is a read or write operation based on the operation instruction, and encode it as the operation type; Read the number of data bytes for this operation from the data packet of each I / O request, and use that as the data size; Based on the logical name in the configuration information of the database / storage resource pointed to by each I / O request, obtain the target logical data source identifier; The time interval between each I / O request being sent and the application layer returning a response is measured and recorded as the application layer response time. The expression for the application layer response time is: In the formula, Represented as application layer response time. This represents the timestamp of the response returned by the application layer. Represented as the timestamp of the I / O request being issued; Multiple data items are formatted into a single structured record in JSON or Protocol Buffer format, forming a tenant-level I / O operation pipeline. The expression for the tenant-level I / O operation pipeline is: In the formula, Represented as tenant-level I / O operation pipeline, Represented as tenant ID, This is represented as an operation timestamp. Indicated as the operation type. This is expressed as the size of the data. Represented as the target logical data source identifier, This is represented as the application layer response time.
[0024] Specifically, the steps for obtaining physical disk performance metrics are as follows: Deploy a physical resource monitoring agent at the operating system layer of the pharmaceutical SaaS platform. The physical resource monitoring agent is started at the operating system layer and configured with a sampling interval. The physical resource monitoring agent reads raw kernel statistics data at the beginning of each sampling interval by calling the disk controller interface and the operating system kernel interface. The raw data includes the number of disk read and write operations completed, the total latency of disk read and write operations, the current I / O request queue length of the disk, and the total time the disk is busy with I / O requests. The physical resource monitoring agent uses raw data from two sampling points to calculate the physical disk read / write queue length, read / write operations per second (IOPS), average read / write latency, and disk utilization percentage. After organizing and recording this data, it obtains physical disk performance metrics. The physical disk read / write queue length is defined as the current I / O request queue length of the disk, calibrated as... ; The formula for calculating read / write operations per second (IOPS) is as follows: In the formula, This is expressed as the number of read / write operations per second. This represents the number of read operations completed within the sampling interval. This represents the number of write operations completed within the sampling interval. This is expressed as the time interval between two sampling points; The formula for calculating average read / write latency is as follows: In the formula, This is expressed as average read / write latency. This represents the total delay time of the read operation within the sampling interval. This represents the total delay time for write operations within the sampling interval. This represents the total number of disk read and write operations. This represents the total latency for disk read / write operations. The formula for calculating disk utilization percentage is: In the formula, Expressed as a percentage of disk utilization. This represents the disk busy time within the sampling interval; The calculated physical disk performance metrics are formatted as a record and stored in the performance metric database. The expression for the physical disk performance metric is as follows: In the formula, This is expressed as a physical disk performance metric. This represents the timestamp of the physical disk performance record.
[0025] Specifically, the steps for generating a linked data record set are as follows: The data association engine receives tenant-level I / O operation pipeline records from the tenant context-aware probe and disk performance metric records from the physical resource monitoring agent, and aligns the two data streams to the same time window based on the timestamp. For each I / O operation record, the data association engine uses its target logical data source identifier to query the pre-configured "logical data source-physical disk location mapping table" to determine the physical disk device ID corresponding to the logical data source; Based on the operation timestamp of the I / O operation record and the physical disk device ID, search for a disk performance record with a time match in the physical disk performance metrics. The formula for calculating the time match is as follows: In the formula, It is expressed as the absolute difference between the I / O operation timestamp and the disk performance sampling timestamp. This is represented as an operation timestamp. This represents the timestamp used to record physical disk performance. This is expressed as the time tolerance threshold, and ; The I / O operation records are associated and merged with the matching physical disk performance records to generate a "tenant-operation-physical impact" associated data record; All related data records are aggregated into a related data record set and output to distributed storage or a message queue for use by subsequent tenant behavior analysis and I / O load peak prediction modules. The expression for the related data record set is: In the formula, Represented as a set of related data records. Represented as the first Multiple data points form data records for tenant-level I / O operation pipelines. Represented as the first Data records of physical disk performance metrics, Represented as the first Multiple data points form the operation timestamps of the data records used to create a tenant-level I / O operation pipeline. Represented as the first The timestamp of each physical disk performance metric data record. This is represented as a temporal correlation and fusion.
[0026] Tenant Behavior Analysis and I / O Load Peak Prediction Module: Based on a set of associated data records, this module uses an unsupervised learning clustering algorithm to analyze feature data. Tenants are categorized into different behavior patterns based on I / O operation frequency, data volume, and time patterns. A dynamically updated I / O behavior profile file is generated for each tenant, including its category, historical load baseline, and quantitative features of activity time patterns. Using each tenant's historical I / O load time-series data, combined with external event features, the module trains a Long Short-Term Memory (LSTM) network model, outputting a predicted I / O load curve for each tenant within a specific future time window. The system overlays the predicted I / O load curves of all tenants at each time point to predict the peak I / O load period and severity at the physical disk level, generating a tenant behavior profile library and a system-level I / O load prediction report. Specifically, the steps for generating and dynamically updating the I / O behavior profile file are as follows: I / O operation characteristic data for each tenant is extracted from the associated data record set, including the I / O operation frequency within a time window, the average number of bytes per I / O operation, the temporal pattern of operation distribution throughout the day, and the ratio of read / write operation types. The expression for the I / O operation frequency within a time window is: In the formula, This is expressed as the I / O operation frequency. This represents the total number of I / O operations within the time window. This is represented as the time window for I / O operations; The expression for the average number of bytes per I / O operation is: In the formula, The amount of data represented as the average number of bytes per I / O operation. This is represented as the first time within the time window. The amount of data per I / O operation; The expression for I / O operation characteristic data is: In the formula, Represented as I / O operation characteristic data, This represents the temporal pattern of operations distributed throughout the day, hour by hour. This is represented as the ratio of read / write operations. The extracted I / O operation feature data is standardized using the Z-score normalization algorithm to eliminate the influence of dimensions. The expression for the Z-score normalization algorithm is as follows: In the formula, Standardized feature data representing I / O operation feature data. This is expressed as the mean of I / O operation characteristics across all tenants. This is expressed as the standard deviation of I / O operation characteristic data across all tenants; The unsupervised learning clustering algorithm K-means is used to cluster the standardized feature data, and the optimal number of clusters is determined. Each tenant is assigned a category label representing the behavioral pattern type. The expression for the K-means clustering algorithm is as follows: In the formula, The clustering objective function is expressed as the sum of squared distances from all samples to the cluster centers. Represented as the number of clusters, Represented as the first Each cluster contains a set of samples. Represented as the first The center vectors of the clusters, It is expressed as the square of the Euclidean distance; An initial I / O behavior profile file is generated for each tenant, which includes quantitative features of the tenant's category, historical load baseline, and activity time patterns. The category is the type of behavior pattern that the tenant belongs to in the K-means clustering algorithm analysis. The historical load baseline is obtained by calculating the mean, peak, or variance statistics of the tenant's historical I / O load. The expression for calculating the average historical load baseline of a tenant's historical I / O load is as follows: In the formula, Represented as the historical load baseline, This represents the total number of historical I / O operations. Represented as the first The load of previous historical I / O operations; The activity time pattern is determined by analyzing tenant I / O operation time series, using Fourier transform to extract periodic characteristics of tenant activity patterns, or by statistically analyzing the average number of operations per hour of the day, or by calculating the standard deviation of operation time. The expression for the activity time pattern is based on the calculated standard deviation of operation time. In the formula, Expressed as the standard deviation of operation time, Represented as the first Time of one I / O operation This is expressed as the average time of all I / O operations; As new related data records are continuously generated, a sliding time window is set to periodically repeat cluster analysis. An incremental learning approach is used to update the K-means clustering model and each tenant's I / O behavior profile file, triggering re-clustering to monitor tenant behavior pattern drift. This allows for profile adjustments based on changes in tenant behavior. The expression for behavior pattern drift is as follows: In the formula, This is referred to as behavioral pattern drift. This is represented as the mean vector of tenant behavior characteristics within the current time window. It is represented as the mean vector of tenant behavior characteristics within a historical time window. This represents the drift detection threshold.
[0027] Specifically, the I / O load prediction steps of the LSTM model are as follows: Historical I / O load time-series data for each tenant is extracted from the associated data record set and normalized. At the same time, external event features such as holidays, promotional activities and weather factors are collected, encoded, and sequence sample data is generated. The normalized sequence sample data is divided into training set, validation set and test set using the sliding window method. A Long Short-Term Memory (LSTM) network model consisting of an input gate, a forget gate, an output gate, and cell states is constructed. The training set data is input into the LSTM model, and the model is trained by combining external event features. The LSTM model minimizes the prediction error through backpropagation and gradient descent algorithms. The performance of the LSTM model is evaluated using validation set data, and the parameters of the LSTM model weights and biases are adjusted based on the evaluation results. Using a trained LSTM model, inputting historical I / O load time series data and external event features from the most recent time step, outputting the predicted value for a specific future time step, thus obtaining the predicted I / O load curve for each tenant within a specific future time window.
[0028] Specifically, the steps for generating the tenant behavior profile library and the system-level I / O load prediction report are as follows: The I / O behavior profile files of each tenant are aggregated to form a tenant behavior profile library. This tenant behavior profile library is a queryable and controllable database. It is designed with a hierarchical storage structure and supports profile history tracing and rollback. The hierarchical storage structure includes a tenant basic information layer, a behavior feature layer, and a prediction model layer, which respectively store information such as each tenant ID, category, historical load baseline, activity time pattern, and predicted I / O load curve. Profile history tracing and rollback also includes operations for adding, updating, and deleting tenant profiles. First, obtain the I / O load forecast curves for all tenants within the same time period. Then, superimpose the I / O load forecast curves of all tenants at each time point to obtain the overall system-level I / O load forecast curve. The superposition expression for the I / O load forecast curves is as follows: In the formula, Indicated as in System-level I / O load at any given moment Represented as the total number of tenants. Represented as the first One tenant Predicted I / O load at any given time Indicated as when the first The tenant is mapped to the first An indicator function that returns 1 if there are multiple disks, and 0 otherwise. Represented as the first One tenant, Represented as the first One disk; Peak detection is performed based on the system-level I / O load prediction curve to identify the peak intensity, duration, and frequency of peak load periods. The severity of the peak is then assessed against historical load baselines. The expression for peak severity assessment is as follows: ,and In the formula, The assessment score is expressed as the peak severity. This is represented by the weighting coefficient corresponding to the peak fluctuation. Expressed as peak load intensity, Represented as the historical load baseline, This is expressed as a weighting coefficient corresponding to the peak duration ratio. This is expressed as the peak duration. This represents the total observation time. This is represented by a weighting coefficient corresponding to the frequency of occurrence of the peak value. This is expressed as the frequency of peak occurrence; The system compiles predictions of peak I / O load periods and severity, and automatically generates a system-level I / O load prediction report. This report includes the system-level I / O load curve for a specific future time window, a list of predicted peak periods, a severity rating for each peak period, and a list of potentially affected physical disks based on the mapping relationship between tenant data sources and physical disks. It also provides a visual representation of the system-level load heatmap, peak distribution map, and bottleneck disk rankings, and offers an interactive query interface that supports filtering by time range, disk, and tenant category. By combining information from the tenant behavior profile database, the impact of different tenant behavior patterns on system I / O load is analyzed. In addition, different alarm thresholds are set according to the severity of the assessment, and system-level I / O load prediction reports are automatically sent to relevant operation and maintenance personnel.
[0029] Resource dynamic scheduling decision execution module: After receiving the system-level I / O load prediction report, it uses the intelligent scheduler to initiate the decision process and selects the optimal strategy from a predefined scheduling strategy library. For example, for mild bottlenecks, it uses I / O priority adjustment, and for medium to heavy bottlenecks, it initiates an online data migration strategy. When the optimal strategy is data migration, the system will send a resource pre-allocation request to the target disk. After migration, the intelligent scheduler will update the global logical data source-physical disk location mapping table, record the strategy execution results, and generate a scheduling execution feedback report, including the strategy adopted, migration start and end times, migration data volume, and mapping table change records. Specifically, the predefined scheduling strategy library includes strategies for adjusting I / O priorities for minor bottlenecks and initiating online data migration for medium to severe bottlenecks. The steps for adjusting I / O priorities are as follows: Analyze the system-level I / O load prediction report to obtain the ratio of the predicted peak value to the system threshold; Based on the preset bottleneck level classification criteria, the system is determined to be in a state of mild bottleneck, and the tenant ID and tenant behavior pattern type causing the mild bottleneck due to I / O tasks are identified. The expression for bottleneck level classification is as follows: ,and For a mild bottleneck state, in the formula, This is expressed as the bottleneck ratio. This is expressed as the predicted peak value of the I / O load. The system threshold is expressed as I / O load; By querying the tenant behavior profile database, the business type characteristics of high-load tenants are obtained, and priority weights are set according to business importance. Priority is calculated for each I / O task, and a differentiated I / O task bandwidth limiting priority strategy is formulated. The expression for I / O task bandwidth limiting is as follows: ,and In the formula, Represented as the first The maximum I / O bandwidth allocated to each tenant This is expressed as the total I / O bandwidth of the physical disk. Represented as the first according to business importance The basic weight of each tenant This is represented as an adjustment factor for controlling the intensity of the restriction; A tree-like hierarchical structure is created through the operating system interface to assign corresponding I / O task weights to tenants of different priorities. Parameters such as bandwidth limits and IOPS (Input / Output Counts per Second) are dynamically adjusted to implement rate limiting strategies, achieving fair allocation and isolation of disk resources for different I / O task processes. The expression for assigning I / O task weights is as follows: In the formula, This is represented as the assigned I / O task weight. This represents the total number of restricted tenants. Represented as the first The maximum I / O bandwidth allocated to each tenant This is represented by the floor symbol; Continuously monitor the execution of adjusted system I / O operations and dynamically fine-tune the limiting parameters to optimize priorities based on actual load changes; Set an effective time window for priority adjustments that cover the predicted peak period, so that the restrictions can be automatically lifted after the peak period, normal I / O task scheduling can be restored, and the adjustment history can be recorded. The steps for online data migration are as follows: Based on the system-level I / O load prediction report and the preset bottleneck level classification standard, the system is determined to be in a medium to heavy bottleneck state. A suitable target disk is selected from the available physical source disks to ensure that the target disk has sufficient capacity and performance margin. At the same time, the expected amount of data to be migrated and the time window are calculated. Initiate a resource pre-allocation request to the target disk, reserve the network bandwidth and computing resources required during the migration process, and then establish metadata records for the migration task to ensure that there is enough space and I / O bandwidth for data migration. An incremental migration strategy is adopted to gradually migrate data from the source disk to the target disk while ensuring the normal operation of the business. Data integrity is ensured during the migration process by setting data consistency checkpoints. After the migration is complete, verify the consistency of the migrated data to ensure the integrity and accuracy of the data, switch the access route to the target disk, and release the storage space of the source disk. The intelligent scheduler updates the global logical data source-physical disk location mapping table and archives migration task records.
[0030] Specifically, the update steps for the logical data source-physical disk location mapping table are as follows: Confirm that the data migration operation has been completed and the data verification has passed, and prepare the mapping relationship between the logical data source and the target physical disk; Locate the old physical disk record corresponding to the logical data source that needs to be updated in the mapping table, and update the physical disk information in the old record to the new target disk information; By updating the routing cache of the data access driver layer, new I / O requests are correctly routed to the target disk, the updated logical data source-physical disk location mapping table is saved, and the change audit log is recorded.
[0031] Specifically, the steps for generating the scheduling execution feedback report are as follows: Based on the strategy execution results, collect data during the strategy execution process, including the strategy adopted, migration start and end times, migration data volume, and mapping table change records; The data during strategy execution is time-aligned, organized, and formatted. Calculate the performance gain metric for I / O scheduling operations, and evaluate the cost-effectiveness by combining statistical resource consumption and cost indicators. The expression for the performance gain metric is: In the formula, Expressed as a percentage of performance gain. This represents the average I / O latency before policy execution scheduling. This represents the average I / O latency after policy execution scheduling; The expression for evaluating cost-benefit is: In the formula, Expressed as cost-benefit ratio, This represents the resource consumption and cost indicators of scheduling operations. By comparing the predicted I / O operations with the actual occurrences, the accuracy of the predictions is evaluated. This analysis further reveals the effectiveness and accuracy of the scheduling strategy, thereby identifying anomalies. The expression for evaluating prediction accuracy is as follows: In the formula, This is expressed as prediction accuracy. This is represented as the predicted I / O load. This represents the actual I / O load that occurs. Based on performance gain metrics, cost-effectiveness assessment, and prediction accuracy evaluation, a weighted algorithm is used to comprehensively score I / O scheduling operations. The results of the integrated strategy execution are analyzed, a scheduling execution feedback report is generated, and the report is automatically distributed to relevant operations and maintenance personnel. The comprehensive scoring expression for I / O scheduling operations is as follows: ,and In the formula, This is represented as a comprehensive score for scheduling operations. This is expressed as a weighting coefficient corresponding to the percentage of performance gain. This is expressed as a weighting coefficient for the corresponding cost-benefit ratio. This is represented as the weighting coefficient corresponding to the prediction accuracy.
[0032] The performance evaluation feedback optimization strategy module compares the actual I / O load of the physical disk with the predicted value or the average disk latency reduction rate before and after resource scheduling execution based on the scheduling execution feedback report. It quantitatively calculates the performance gain and cost loss evaluation results after resource scheduling, and then uses the complete data sequence associated with the evaluation results as new training samples to retrain the LSTM model to correct the bias, so as to optimize the prediction accuracy of the LSTM model. At the same time, it optimizes the scheduling strategy library.
[0033] Specifically, the quantitative calculation steps for the evaluation results are as follows: Extract the predicted peak periods before and after resource scheduling execution from the scheduling execution feedback report, and monitor the actual I / O load indicators and predicted values of physical disks in real time during the predicted peak periods. The actual I / O load indicators include actual I / O throughput and actual disk average latency. At the same time, obtain the cost loss data during the resource scheduling process, including the storage cost of migrated data and the computing resource cost during the migration process. The predicted peak period is divided into time slices of equal length, and the average I / O latency, IOPS, and disk utilization are calculated within each time slice. The absolute and relative errors between statistical forecasts and actual values are used to calculate the forecast accuracy index before and after scheduling. The formula for calculating the forecast accuracy index is as follows: ,and In the formula, It is expressed as the mean absolute error between the predicted value and the actual value. This represents the number of time slices divided into the predicted peak period. Represented as the first Predicted I / O load for each time slice Represented as the first The actual I / O load occurring in each time slice It is expressed as the mean absolute percentage error between the predicted and actual values; The throughput performance gain and data migration cost loss after resource scheduling are quantitatively evaluated. A weighted scoring method is used to comprehensively analyze the throughput performance gain and data migration cost loss to calculate the overall benefit, resulting in the final evaluation result. The formula for calculating the throughput performance gain is as follows: In the formula, This is expressed as throughput gain. Represented as IOPS after policy execution scheduling. Represented as IOPS before policy execution scheduling; The formula for calculating data migration cost loss is as follows: In the formula, Expressed as data migration cost, This represents the total amount of data migrated. This is represented as available bandwidth. This is represented as the migration time.
[0034] Additionally, the optimization steps for the LSTM model are as follows: The complete data sequence associated with the evaluation results is used as a new training sample and merged with the original historical data; The merged data is then normalized. Adjust the learning rate and number of iterations parameters of the LSTM model; The LSTM model is retrained using new training data, and the model's weights and biases are adjusted using the backpropagation algorithm. Use validation set data to calculate mean squared error or mean absolute error to evaluate the performance of the optimized LSTM model. Repeat the iteration until the LSTM model performance is optimized within the expected range; The optimization steps for the scheduling strategy library are as follows: Based on the evaluation results, we analyze the performance gains and cost losses of different scheduling strategies under different bottleneck levels. Screen out poorly performing scheduling strategies and adjust the weights of I / O priorities and optimize the selection rules for target disks during data migration; Based on the analysis results, we will attempt to generate a new scheduling strategy; Use historical or simulated data to validate the adjusted and new strategies, and re-evaluate the performance of the adjusted strategies. Update the validated policies to the scheduling policy library.
[0035] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0036] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.
[0037] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0038] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0039] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A multi-tenant dynamic data source isolation system for a pharmaceutical SaaS platform, characterized in that, It includes a multi-dimensional monitoring data acquisition and processing module: embedding a tenant context-aware probe in the data access driver layer of the medical SaaS platform to capture every I / O request and extract multiple data information; at the same time, deploying a physical resource monitoring agent in the operating system layer to obtain physical disk performance indicators; and then using a data association engine to associate and fuse multiple data information and physical disk performance indicators to generate a set of associated data records of tenant-operation-physical impact. Tenant Behavior Analysis and I / O Load Peak Prediction Module: Based on the associated data record set, the module uses the unsupervised learning clustering K-means algorithm to analyze feature data, generates a dynamically updated I / O behavior profile file for each tenant, uses the historical I / O load time series data of each tenant, and combines external event features to input the LSTM model for training, outputs the predicted I / O load curve for each tenant in a specific future time window, and overlays the predicted I / O load curves of all tenants at each time point to generate a tenant behavior profile library and a system-level I / O load prediction report; Resource dynamic scheduling decision execution module: After receiving the system-level I / O load prediction report, it uses the intelligent scheduler to start the decision process, selects the optimal strategy from a predefined scheduling strategy library, records the strategy execution results, and generates a scheduling execution feedback report. The performance evaluation feedback optimization strategy module compares the resource scheduling execution before and after the scheduling execution based on the scheduling execution feedback report, quantitatively calculates the performance gain and cost loss evaluation results after resource scheduling, and then uses the complete data sequence associated with the evaluation results as new training samples to retrain the LSTM model, while optimizing the scheduling strategy library.
2. The multi-tenant dynamic data source isolation system for a pharmaceutical SaaS platform according to claim 1, characterized in that, The steps for extracting the various data information are as follows: Embed tenant context-aware probes in the data access-driven layer of the pharmaceutical SaaS platform to monitor and capture every I / O request; Extract multiple data items from the captured I / O requests, including tenant ID, operation timestamp, read / write operation type, data size, target logical data source identifier, and application layer response time. Multiple data items are formatted into a single structured record in JSON or Protocol Buffer format, forming a tenant-level I / O operation pipeline.
3. The multi-tenant dynamic data source isolation system for a pharmaceutical SaaS platform according to claim 2, characterized in that, The steps for obtaining the physical disk performance metrics are as follows: Deploy a physical resource monitoring agent at the operating system layer of the pharmaceutical SaaS platform. The physical resource monitoring agent is started at the operating system layer and configured with a sampling interval. The physical resource monitoring agent reads raw kernel statistics data at the beginning of each sampling interval by calling the disk controller interface and the operating system kernel interface; The physical resource monitoring agent uses the raw data from the two sampling points to calculate the physical disk read / write queue length, read / write operations per second (IOPS), average read / write latency, and disk utilization percentage, and then collects and records the data to obtain physical disk performance metrics. The calculated physical disk performance metrics are formatted as a record and stored in the performance metrics database.
4. The multi-tenant dynamic data source isolation system for a pharmaceutical SaaS platform according to claim 3, characterized in that, The steps for generating the associated data record set are as follows: The data association engine receives tenant-level I / O operation pipeline records from the tenant context-aware probe and disk performance metric records from the physical resource monitoring agent, and aligns the two data streams to the same time window based on the timestamp. For each I / O operation record, the data association engine uses its target logical data source identifier to query the pre-configured "logical data source-physical disk location mapping table" to determine the physical disk device ID corresponding to the logical data source; Based on the operation timestamp of the I / O operation record and the physical disk device ID, find the disk performance record with the matching time in the physical disk performance metrics; The I / O operation records are associated and merged with the matching physical disk performance records to generate a "tenant-operation-physical impact" associated data record; All related data records are aggregated into a related data record set and output to distributed storage or message queue for use by subsequent tenant behavior analysis and I / O load peak prediction modules.
5. The multi-tenant dynamic data source isolation system for a pharmaceutical SaaS platform according to claim 4, characterized in that, The steps for generating and dynamically updating the I / O behavior profile file are as follows: Extract I / O operation characteristic data for each tenant from the associated data record set, including the frequency of I / O operations within the time window, the average number of bytes per I / O operation, the temporal pattern of operation distribution in each hour of the day, and the ratio of read / write operation types; The extracted I / O operation feature data is standardized using the Z-score standardization algorithm to obtain standardized feature data. The K-means unsupervised learning clustering algorithm is used to cluster the standardized feature data, and the optimal number of clusters is determined. Each tenant is assigned a category label representing the type of behavior pattern. Generate an initial I / O behavior profile file for each tenant, including quantitative characteristics such as the category, historical load baseline, and activity time patterns; As new related data records are continuously generated, a sliding time window is set to periodically repeat cluster analysis. An incremental learning approach is used to update the K-means clustering model and the I / O behavior profile file of each tenant, triggering re-clustering to monitor the drift of tenant behavior patterns.
6. The multi-tenant dynamic data source isolation system for a pharmaceutical SaaS platform according to claim 5, characterized in that, The I / O load prediction steps of the LSTM model are as follows: Historical I / O load time-series data for each tenant is extracted from the associated data record set and normalized. At the same time, external event features such as holidays, promotional activities and weather factors are collected, encoded, and sequence sample data is generated. The normalized sequence sample data is divided into training set, validation set and test set using the sliding window method. A Long Short-Term Memory (LSTM) network model consisting of an input gate, a forget gate, an output gate, and cell states is constructed. The training set data is input into the LSTM model, and the model is trained by combining external event features. The LSTM model minimizes the prediction error through backpropagation and gradient descent algorithms. The performance of the LSTM model is evaluated using validation set data, and the parameters of the LSTM model weights and biases are adjusted based on the evaluation results. Using a trained LSTM model, inputting historical I / O load time series data and external event features from the most recent time step, outputting the predicted value for a specific future time step, thus obtaining the predicted I / O load curve for each tenant within a specific future time window.
7. A multi-tenant dynamic data source isolation system for a pharmaceutical SaaS platform according to claim 6, characterized in that, The steps for generating the tenant behavior profile library and the system-level I / O load prediction report are as follows: The I / O behavior profile files of each tenant are aggregated to form a tenant behavior profile library. This tenant behavior profile library is a queryable and controllable database with a hierarchical storage structure and supports profile history tracing and rollback. First, obtain the I / O load forecast curves of all tenants in the same time period, and then superimpose the I / O load forecast curves of all tenants at each time point to obtain the entire system-level I / O load forecast curve. Peak detection is performed based on the system-level I / O load prediction curve to identify the peak intensity, duration and frequency of occurrence during peak load periods, and the severity of the peak is assessed based on the historical load baseline. The system compiles prediction results of peak periods and severity of system-level I / O load, automatically generates a system-level I / O load prediction report, and visualizes system-level load heatmaps, peak distribution maps, and bottleneck disk rankings. Different alarm thresholds are set according to the severity of the assessment, and system-level I / O load prediction reports are automatically sent to administrators.
8. The multi-tenant dynamic data source isolation system for a pharmaceutical SaaS platform according to claim 7, characterized in that, The predefined scheduling strategy library includes strategies for adjusting I / O priorities for minor bottlenecks and for initiating online data migration for medium to severe bottlenecks.
9. A multi-tenant dynamic data source isolation system for a pharmaceutical SaaS platform according to claim 8, characterized in that, The quantitative calculation steps for the evaluation results are as follows: Extract the predicted peak periods before and after resource scheduling execution from the scheduling execution feedback report, monitor the actual I / O load indicators and predicted values of physical disks in real time during the predicted peak periods, and obtain cost loss data during the resource scheduling process. The predicted peak period is divided into time slices of equal length, and the average I / O latency, IOPS, and disk utilization are calculated within each time slice. Calculate the absolute and relative errors between the statistical forecast and the actual value, and calculate the forecast accuracy index before and after scheduling; The throughput performance gain and data migration cost loss after resource scheduling are quantitatively evaluated, and a weighted scoring method is used to comprehensively analyze the throughput performance gain and data migration cost loss to calculate the overall benefits and obtain the final evaluation results.
10. A computer device, comprising: A memory / readable storage medium and a processor; the memory / readable storage medium stores a computer program, characterized in that: when the processor executes the computer program, it implements the steps of a multi-tenant dynamic data source isolation system for a pharmaceutical SaaS platform as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Dynamic data isolation method and system based on multiple data sources
CN118504009A