A multi-tenant supported document editor SaaS platform system and implementation method

By binding server-side sessions and isolating logical data through unique tenant identifiers, the problem of insufficient tenant identification in existing document editor SaaS platforms is solved, and data independence and security management in multi-tenant scenarios are achieved.

CN123139947APending Publication Date: 2026-11-20WIN THE BID HUIKANG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611168515.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-03
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing document editor SaaS platforms lack tenant identification and binding mechanisms, resulting in data confusion and blurred permission boundaries, failing to meet the data independence and security requirements in multi-tenant scenarios.

Method used

By binding server sessions with unique tenant identifiers, logical data isolation storage and function permission configuration are achieved. Combined with identity token parsing and interceptor technology, the accuracy and independence of data storage and access control are ensured.

Benefits of technology

It achieves data isolation and access control in multi-tenant scenarios, ensures the accuracy of data ownership, adapts to the personalized configuration needs of different tenants, and improves the platform's data security and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123139947A_ABST
    Figure CN123139947A_ABST
Patent Text Reader

Abstract

The application provides a document editor SaaS platform system supporting multi-tenancy and an implementation method, the document editor SaaS platform system comprising a document operation request processing module, configured to acquire a tenant unique identifier corresponding to a client according to a document operation request of the client, and bind the tenant unique identifier to a server; an isolation and configuration control module, configured to logically isolate and store different tenant data according to the tenant unique identifier by the server, and perform permissionable configuration when an editor initialization configuration acquisition request is initiated by the client; and a verification and saving module, configured to perform a saving operation by the server after completing tenant unique identifier verification according to a document content change saving request of the client.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention proposes a document editor SaaS platform system and implementation method that supports multi-tenancy, belonging to the field of document editing technology. Background Technology

[0002] With the popularization of the SaaS model, multi-user shared online document editor platforms have been widely used in various enterprise collaboration scenarios. However, most existing conventional document editor SaaS platforms lack a robust tenant identification and binding mechanism. These platforms struggle to accurately distinguish operation requests from different enterprise tenants, and multi-tenant data often employs a hybrid storage model, relying solely on simple user accounts to differentiate data without achieving logical isolation at the tenant level. This storage method easily leads to data confusion between different tenants, blurred permission boundaries, and potential risks of data corruption and unauthorized access. Furthermore, traditional platforms lack dedicated initial permission configuration logic for each tenant; all tenants share the same set of editor configuration parameters, failing to adapt to the personalized configuration needs of different tenants. In addition, existing document saving processes lack tenant-level verification; data writing operations are performed simply by verifying user identity, without confirming the tenant affiliation of the operation subject. The accuracy of data storage ownership cannot be guaranteed, making it difficult to meet the requirements of data independence, configuration differentiation, and data security management for multi-tenant SaaS platforms. Summary of the Invention

[0003] This invention provides a document editor SaaS platform system and implementation method that supports multi-tenancy, in order to solve the above-mentioned technical problems existing in the prior art. The technical solution adopted is as follows:

[0004] A multi-tenant document editor SaaS platform system includes:

[0005] The document operation request processing module is used to obtain the unique identifier of the tenant corresponding to the client based on the client's document operation request, and bind the unique identifier of the tenant to the server.

[0006] The isolation and configuration control module is used by the server to logically isolate and store data of different tenants based on the tenant's unique identifier, and to configure function permissions when the client initiates an editor initialization configuration request.

[0007] The verification and saving module is used to change the save request based on the client's document content. After the server completes the tenant's unique identifier verification, it performs the save operation.

[0008] Preferably, the document operation request processing module is used to obtain the tenant unique identifier corresponding to the client based on the client's document operation request, and bind the tenant unique identifier to the server, including:

[0009] Receive document operation requests initiated by clients in real time;

[0010] Extract the identity token from the request header corresponding to the document operation request, and parse the identity token to obtain the tenant's unique identifier carried in the identity token;

[0011] The tenant's unique identifier is bound to the context variable of the current server's request thread.

[0012] Preferably, the isolation and configuration control module is used by the server to logically isolate and store data of different tenants based on the tenant's unique identifier, and to configure function permissions when the client initiates an editor initialization configuration retrieval request, including:

[0013] The server performs database read and write operations based on the tenant's unique identifier. During the database read and write operation, the data access layer interceptor automatically concatenates filter conditions containing the tenant field for all structured query language statements and automatically fills in the tenant field to achieve logical isolation storage of data from different tenants.

[0014] Real-time monitoring to see if the client has received an editor initialization configuration retrieval request;

[0015] When a client sends a request to retrieve editor initialization configuration, the system queries the cache or database for the corresponding function license configuration item based on the tenant's unique identifier.

[0016] The function license configuration item is initialized to complete the function license configuration, and the initialization parameters corresponding to the function license configuration item are returned to the client.

[0017] After receiving the initialization parameters corresponding to the function license configuration item, the client controls the display or hiding state of the corresponding function controls on the editor interface according to the function license configuration.

[0018] Preferably, the verification and saving module is used to change the save request based on the client's document content. After the server completes the tenant's unique identifier verification, it performs the save operation, including:

[0019] Real-time monitoring to see if a request to save document content changes submitted by the client is received;

[0020] When a document content change and save request is received from the client, the unique identifier of the tenant corresponding to the client is extracted from the request context, request header or request parameters of the document content change and save request, and the document identifier corresponding to the document content change and save request is extracted from the interface route or request parameters of the document content change and save request.

[0021] Send the unique tenant identifier corresponding to the client and the document identifier corresponding to the document content change save request to the server.

[0022] After receiving the tenant unique identifier corresponding to the client and the document identifier corresponding to the document content change save request, the server performs a consistency check between the currently received tenant unique identifier corresponding to the client and the tenant unique identifier in the thread context variable.

[0023] If the tenant unique identifier corresponding to the currently received client matches the tenant unique identifier in the thread context variable, then the client is allowed to execute the operation corresponding to the document content change save request, and the document content after the operation is stored in the storage path named after the tenant unique identifier.

[0024] Corresponding to any of the aforementioned preferred methods, embodiments of the present invention also provide an implementation method for a document editor SaaS platform system supporting multi-tenancy, comprising:

[0025] Based on the client's document operation request, obtain the unique tenant identifier corresponding to the client, and bind the unique tenant identifier to the server.

[0026] The server stores data for different tenants in logical isolation based on the tenant's unique identifier, and performs function permission configuration when the client initiates an editor initialization configuration retrieval request.

[0027] Based on the client's request to save document content changes, the server performs the save operation after verifying the tenant's unique identifier.

[0028] Preferably, based on the client's document operation request, the unique identifier of the tenant corresponding to the client is obtained, and the unique identifier of the tenant is bound to the server, including:

[0029] Receive document operation requests initiated by clients in real time;

[0030] Extract the identity token from the request header corresponding to the document operation request, and parse the identity token to obtain the tenant's unique identifier carried in the identity token;

[0031] The tenant's unique identifier is bound to the context variable of the current server's request thread.

[0032] Preferably, the server logically isolates and stores data for different tenants based on the tenant's unique identifier, and performs function permission configuration when the client initiates an editor initialization configuration retrieval request, including:

[0033] The server performs database read and write operations based on the tenant's unique identifier. During the database read and write operation, the data access layer interceptor automatically concatenates filter conditions containing the tenant field for all structured query language statements and automatically fills in the tenant field to achieve logical isolation storage of data from different tenants.

[0034] Real-time monitoring to see if the client has received an editor initialization configuration retrieval request;

[0035] When a client sends a request to retrieve editor initialization configuration, the system queries the cache or database for the corresponding function license configuration item based on the tenant's unique identifier.

[0036] The function license configuration item is initialized to complete the function license configuration, and the initialization parameters corresponding to the function license configuration item are returned to the client.

[0037] After receiving the initialization parameters corresponding to the function license configuration item, the client controls the display or hiding state of the corresponding function controls on the editor interface according to the function license configuration.

[0038] Preferably, based on the client's document content change save request, the server performs a save operation after completing the tenant unique identifier verification, including:

[0039] Real-time monitoring to see if a request to save document content changes submitted by the client is received;

[0040] When a document content change and save request is received from the client, the unique identifier of the tenant corresponding to the client is extracted from the request context, request header or request parameters of the document content change and save request, and the document identifier corresponding to the document content change and save request is extracted from the interface route or request parameters of the document content change and save request.

[0041] Send the unique tenant identifier corresponding to the client and the document identifier corresponding to the document content change save request to the server.

[0042] After receiving the tenant unique identifier corresponding to the client and the document identifier corresponding to the document content change save request, the server performs a consistency check between the currently received tenant unique identifier corresponding to the client and the tenant unique identifier in the thread context variable.

[0043] If the tenant unique identifier corresponding to the currently received client matches the tenant unique identifier in the thread context variable, then the client is allowed to execute the operation corresponding to the document content change save request, and the document content after the operation is stored in the storage path named after the tenant unique identifier.

[0044] Beneficial effects of this invention:

[0045] This invention proposes a multi-tenant document editor SaaS platform system and implementation method. By binding a unique tenant identifier to the server session, the system clearly identifies the tenant entity for each client operation, establishing a complete tenant identity recognition system. A tenant-based logical data storage model delineates data storage boundaries for different tenants, preventing data cross-contamination in multi-tenant scenarios. A configuration and licensing mechanism based on tenant identifiers allows for independent configuration of editor permissions and parameters for different tenants, adapting to diverse platform usage needs. A pre-verified document saving logic ensures a fixed correspondence between document data and tenant identity, guaranteeing the accuracy of data ownership under the platform's multi-tenant architecture and adapting to the multi-entity operation scenarios of the document editor SaaS platform.

[0046] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description and the accompanying drawings.

[0047] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0048] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0049] Figure 1 This is a system block diagram of the system described in this invention;

[0050] Figure 2 This is a flowchart of the method described in this invention. Detailed Implementation

[0051] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0052] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," "outer," "far," "near," "front," and "rear," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0053] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0054] This invention proposes a multi-tenant document editor SaaS platform system for the server side, such as... Figure 1 As shown, it includes:

[0055] The document operation request processing module is used to obtain the unique identifier of the tenant corresponding to the client based on the client's document operation request, and bind the unique identifier of the tenant to the server.

[0056] The isolation and configuration control module is used by the server to logically isolate and store data of different tenants based on the tenant's unique identifier, and to configure function permissions when the client initiates an editor initialization configuration request.

[0057] The verification and saving module is used to change the save request based on the client's document content. After the server completes the tenant's unique identifier verification, it performs the save operation.

[0058] In this embodiment, when a client initiates a document operation request, the server retrieves the unique identifier of the corresponding tenant and binds it to the server session, establishing the tenant affiliation dimension of the operation request. The server uses the tenant's unique identifier as the distinguishing criterion to logically layer and store the document data of each tenant, achieving independent management of data from different tenants. When a client requests editor initialization configuration, the server performs permission and configuration matching verification based on the corresponding tenant identifier and outputs editor permission configuration content adapted to the current tenant. For client requests to save document changes, the server prioritizes compliance verification of the tenant's unique identifier; only after successful verification does it execute the document data saving and writing process, completing closed-loop operation management at the tenant level.

[0059] This embodiment uses a unique tenant identifier bound to the server session to clearly identify the tenant entity for each client operation, establishing a complete tenant identity recognition system. A tenant-based logical data storage model delineates data storage boundaries for different tenants, preventing data cross-contamination in multi-tenant scenarios. A configuration permission mechanism based on tenant identifiers allows for independent configuration of editor permissions and parameters for different tenants, adapting to diverse platform usage needs. Pre-verified document saving logic establishes a fixed correspondence between document data and tenant identity, ensuring the accuracy of data ownership in the platform's multi-tenant architecture and adapting to the multi-entity operation scenarios of the document editor SaaS platform.

[0060] In one embodiment of the present invention, a document operation request processing module is configured to obtain a unique tenant identifier corresponding to the client based on a document operation request from the client, and bind the unique tenant identifier to the server, including:

[0061] Receive document operation requests initiated by clients in real time;

[0062] Extract the identity token from the request header corresponding to the document operation request, and parse the identity token to obtain the tenant's unique identifier carried in the identity token;

[0063] The tenant's unique identifier is bound to the context variable of the current server's request thread.

[0064] In this embodiment, various document operation requests initiated by clients are continuously monitored and received. Upon receiving a request, the identity token carried in the request header is read and parsed to extract the pre-stored unique tenant identifier. After the tenant identifier is extracted, it is written to and bound to the context variable of the current request thread on the server side. This ensures that the corresponding tenant identity information is retained throughout the lifecycle of a single request thread on the server side, providing an identity basis for subsequent data isolation, permission verification, and data storage operations.

[0065] This embodiment obtains the tenant identifier through request header token parsing, adapting to the identity transmission specifications of conventional network requests and offering stronger adaptability. Binding the tenant identifier to the thread context enables precise association between tenant identity information and a single business request, ensuring that each document operation request has an independent tenant affiliation marker. The thread-level variable storage method avoids identity crosstalk issues caused by concurrent requests from different clients, ensuring the stability of identity recognition in multi-tenant concurrent scenarios and providing accurate and reliable identity foundation data for the platform's subsequent tenant data isolation logic.

[0066] Specifically, the identity token is preferably implemented using the JSON Web Token (JWT) standard format; alternatively, the token format specified in the OAuth 2.0 protocol can also be used, in which case the tenant unique identifier field (e.g., field named "tenant_id") contained therein can be obtained through the TokenIntrospection Endpoint or UserInfo Endpoint. When the server receives a client request, it extracts the tenant unique identifier by parsing the digital signature and validity period of the JWT, or by calling the OAuth 2.0 introspection / userinfo interface, and returns an authentication failure response to the client when the token expires or authentication fails.

[0067] In one embodiment of the present invention, an isolation and configuration control module is used for the server to logically isolate and store data of different tenants based on the tenant's unique identifier, and to perform function permission configuration when the client initiates an editor initialization configuration retrieval request, including:

[0068] All database read / write operations (including but not limited to configuration queries, document queries, etc.) performed by the server based on the tenant's unique identifier are automatically concatenated with tenant filtering conditions through the data access layer interceptor. Specifically:

[0069] The server performs database read and write operations based on the tenant's unique identifier. During the execution of the database read and write operations, the data access layer interceptor automatically concatenates filtering conditions containing the tenant field for all SQL statements (structured query language statements) and automatically fills in the tenant field to achieve logical isolation storage of data from different tenants.

[0070] Specifically, the data access layer interceptor can be implemented using the MyBatis plugin mechanism or the Spring framework's AOP (Aspect-Oriented Programming) interceptor; for SELECT query statements, the interceptor automatically appends "AND tenant_id = " to the WHERE condition before the statement is executed. Tenant filtering conditions are in the form of "?", and the unique identifier of the tenant in the current thread context is injected as a parameter value. For INSERT statements, the interceptor automatically appends the tenant_id field to the list of inserted fields and fills the list of inserted values ​​with the unique identifier of the current tenant. For UPDATE and DELETE statements, the interceptor also automatically concatenates the tenant field filtering conditions to ensure that data update and deletion operations only apply to the data range of the current tenant. For system tables that do not require tenant isolation (such as tenant information tables, dictionary tables, etc.), tenant filtering conditions are not automatically concatenated by adding custom annotations (such as @IgnoreTenant) to the corresponding Data Access Object (DAO) or entity class or configuring the interceptor to exclude table names. For JOIN queries involving multiple tables, the default is to use the main table in the query statement (usually the business data table) as the basis for tenant isolation. This main table must contain the tenant field. If the business requires other tables to be used, it can be specified by configuring the alias of the table where the tenant field is located in the corresponding entity class. For special scenarios such as dictionary-based join queries, it is recommended to explicitly specify the isolation table to avoid empty query results or data corruption due to improper selection of the default main table.

[0071] Real-time monitoring to see if the client has received an editor initialization configuration retrieval request;

[0072] When a client sends a request to retrieve the editor initialization configuration, the system queries the cache or database for the corresponding function license configuration item based on the tenant's unique identifier. During this query process, the aforementioned data access layer interceptor also automatically concatenates tenant filtering conditions to ensure that only the configuration data of the current tenant is queried.

[0073] Specifically, the function permission configuration items include at least one of the following types: document editing function switch, document export format permission, maximum number of collaborating members, version history retention duration, and interface function button display / hiding configuration; the configuration items are stored in the tenant configuration table of the database in key-value pairs, and are also cached in the Redis cache with "tenant:config:{tenant unique identifier}" as the key, with a cache validity period of 30 minutes; when the corresponding configuration does not exist in the cache, it is loaded from the database and written to the cache; when the configuration in the database changes (for example, when the administrator modifies the tenant configuration through the management backend), the system actively publishes a configuration change event, and the event listener deletes the corresponding Redis cache key after receiving the event to ensure data consistency between the cache and the database.

[0074] The function license configuration item is initialized to complete the function license configuration, and the initialization parameters corresponding to the function license configuration item are returned to the client.

[0075] After receiving the initialization parameters corresponding to the function license configuration item, the client controls the display or hiding state of the corresponding function controls on the editor interface according to the function license configuration.

[0076] In this embodiment, during server-side data querying, database operation statements are uniformly processed by a data access layer interceptor. This automatically concatenates and populates the filtering conditions for tenant fields, ensuring that all data read / write operations carry tenant-level filtering rules, thus achieving logical isolation and storage of multi-tenant data. The server continuously listens for client requests. Upon capturing an editor initialization configuration retrieval request, it retrieves the corresponding tenant's function permission configuration items from the cache or database based on the bound tenant's unique identifier, completes the initialization of configuration parameters, and sends the initialization parameters back to the client. Upon receiving the parameters, the client adjusts the display and hiding states of various functional controls in the editor interface according to the corresponding function permission configuration rules, achieving tenant-specific editor interface initialization configuration.

[0077] This embodiment achieves data isolation logic without modifying the business code by uniformly concatenating tenant filtering conditions through interceptors, reducing the coupling between business functions and data permission logic. A dual-end configuration query method based on caching and the database improves the reading speed of tenant configuration information and shortens the response time of editor initialization. By independently matching function permission configurations and controlling the state of interface controls for different tenants, differentiated configurations of editor function permissions and interface display can be achieved for each tenant. The entire process is adaptable to multi-tenant concurrent access scenarios, ensuring that the data storage of each tenant is independent and that the editor initialization configuration is consistent with tenant permissions.

[0078] As an example, the function permission configuration controls the editor interface as follows: If the "Document Export Format Permission" in the configuration item only allows PDF format, then when rendering the user interface, the client will only display the PDF option in the drop-down menu of the export button, disabling other format options; if the "Document Editing Function Switch" in the configuration item is off, the client will set the editor content area to read-only mode and hide the relevant buttons in the editing toolbar. Through this method, the client dynamically adjusts the interface interaction elements according to the received function permission configuration parameters, achieving precise control over tenant function permissions.

[0079] In one embodiment of the present invention, a verification and saving module is used to modify the save request based on the document content changes of the client. After the server completes the tenant unique identifier verification, it performs a save operation, including:

[0080] Real-time monitoring to see if a request to save document content changes submitted by the client is received;

[0081] When a document content change and save request is received from the client, the unique identifier of the tenant corresponding to the client is extracted from the request context, request header or request parameters of the document content change and save request, and the document identifier corresponding to the document content change and save request is extracted from the interface route or request parameters of the document content change and save request.

[0082] Send the unique tenant identifier corresponding to the client and the document identifier corresponding to the document content change save request to the server.

[0083] After receiving the tenant unique identifier corresponding to the client and the document identifier corresponding to the document content change save request, the server performs a consistency check between the currently received tenant unique identifier corresponding to the client and the tenant unique identifier in the thread context variable.

[0084] If the tenant unique identifier corresponding to the currently received client matches the tenant unique identifier in the thread context variable, then the client is allowed to execute the operation corresponding to the document content change save request, and the document content after the operation is stored in the storage path named after the tenant unique identifier.

[0085] In a preferred embodiment, to further enhance data security, after the consistency check passes, the system further verifies whether the document corresponding to the document identifier belongs to the tenant: the server queries the document master table in the database based on the document identifier to obtain the tenant field value stored in the document record. If the tenant field value matches the unique tenant identifier in the current thread context, the document is determined to belong to the tenant; if the document record does not exist or the tenant field value is inconsistent, the document is determined not to belong to the tenant, and the save operation is refused and an error response is returned. This preferred step is not a necessary condition for performing the save operation, but it provides stricter cross-tenant access protection.

[0086] Throughout the entire process, the server will refuse to execute the current request operation and return an error response containing error codes and error descriptions to the client when the following abnormal situations occur: In the document operation request processing stage, if the identity token parsing fails (such as token expiration, invalid signature, or incorrect format), the document operation request processing module will directly return an identity authentication failure response; In the verification and storage stage, if the tenant unique identifier consistency verification fails or the document ownership verification in the above preferred embodiment fails, the verification and storage module will return an authorization verification failure response.

[0087] In this embodiment, document content change save requests sent by clients are continuously monitored. Upon identification of a corresponding request, the unique tenant identifier corresponding to the client is extracted from the request context, request header, or request parameters of the document content change save request. The document identifier corresponding to the document content change save request is also extracted from the interface route or request parameters of the document content change save request. Both types of identifier parameters are uploaded to the server. After obtaining the parameters, the server compares and verifies the unique tenant identifier carried in this request with the pre-bound unique tenant identifier in the thread context variable to determine if the two identifiers are consistent. If the verification and comparison pass, the current document change save operation is allowed, and the updated document content is stored in the dedicated storage path corresponding to the unique tenant identifier, completing the persistence of the document change content.

[0088] This embodiment employs a dual verification method—extracting identifiers from interface routes and combining them with thread context verification—to perform secondary confirmation of the tenant's identity during document saving operations, preventing unauthorized cross-tenant document data submissions. Documents are archived through tenant-specific storage paths, ensuring that each tenant's modified document data forms an independent storage partition, maintaining the ownership relationship of document data in a multi-tenant architecture. This verification mechanism and storage method align with the operational logic of a multi-tenant SaaS platform, guaranteeing that document modifications and storage operations always match the corresponding tenant identity, thus improving the standardization of document data management in multi-tenant scenarios.

[0089] In one embodiment, the server logically isolates and stores data from different tenants based on the tenant's unique identifier, which can be implemented through the following steps:

[0090] Step A1: The isolation and configuration control module collects resource consumption data of each tenant in real time through the resource monitoring component on the server side, and marks and aggregates the collected data according to the tenant's unique identifier.

[0091] The resource consumption data includes the number of CPU cores used or the number of megabytes of memory occupied.

[0092] Step A2: Based on the collected data, determine the real-time resource consumption of the current tenant within the preset observation time window. And determine the global arithmetic mean of the resource consumption of all active tenants within the same time window. ;

[0093] Among them, subscript This refers to the current tenant's real-time resource consumption. The average resource consumption of the current tenant within the observation time window is obtained by the resource monitoring component by taking the arithmetic average of the sampled values ​​within the window. and The same type of resource should be used for measurement (i.e., both should be either the number of CPU cores or the number of megabytes of memory), and the values ​​for both should be within the same range. , The total system resource capacity; the active tenant refers to a tenant that has had at least one document operation request successfully processed by the document operation request processing module within the preset observation time window; the preset observation time window is a configurable parameter, preferably 60 seconds;

[0094] Step A3: When the global arithmetic mean R̅ of all active tenants within the current observation time window is greater than a preset first threshold, based on the real-time resource consumption... and the global arithmetic mean The Tenant Load Perturbation Coefficient (TLPC) of the current tenant is determined. To avoid misjudgment caused by the abnormally amplified value of the TLPC value due to the small denominator when the overall system load is extremely low, this calculation must meet the trigger condition. If R̅ is less than or equal to the first threshold, then TLPC = 0 is determined and abnormal tenant determination is not triggered.

[0095] The first threshold can be set as the total system resource capacity. 1%.

[0096] Based on the real-time resource consumption and the global arithmetic mean The Tenant Load Disturbance Factor (TLPC) for the current tenant is determined, and its specific calculation formula is as follows:

[0097]

[0098] in, This is a preset, extremely small positive constant used to prevent the denominator from being zero, in this preferred embodiment. Values TLPC is a dimensionless non-negative real number, representing the relative degree to which the current tenant's resource consumption deviates from the global average level. When a tenant's resource consumption is significantly higher than the global average level, that tenant becomes a resource consumption hotspot. Its frequent requests for computing resources may increase the queuing latency of the shared storage I / O scheduling queue, thereby indirectly affecting the storage access performance of other tenants. The larger a tenant's TLPC value, the greater the deviation of that tenant's resource consumption from the global average level, and the greater the potential pressure on the stability of the logically isolated storage boundary.

[0099] Step A4: Store the calculated TLPC value in the server cache using the tenant's unique identifier as the key (as a quantitative basis for the isolation and configuration control module to determine whether the current tenant is a tenant with abnormal resource consumption); The isolation and configuration control module compares the TLPC value with a preset abnormal threshold. When the TLPC value is higher than the abnormal threshold, the current tenant is determined to be a tenant with abnormal resource consumption. The isolation and configuration control module adjusts the current tenant's allocation weight or data storage priority in the shared storage resource scheduling to avoid continuous interference with other tenants' storage access.

[0100] The abnormal threshold is determined using a dynamic calculation method based on historical system operation data. For example, the isolation and configuration control module collects the historical TLPC values ​​of all tenants within the same time period as the current observation time window over the past 7 natural days and calculates their 95th percentile as the abnormal threshold for the current window. When the system has been running for less than 7 days, the abnormal threshold is set to 0.5 by default.

[0101] The above technical solution identifies individuals whose resource usage behavior is significantly abnormal compared to other tenants by calculating the degree of deviation of a single tenant's resource consumption from the global average level.

[0102] Specifically, the system collects the average resource consumption of the current tenant within a preset time window. Simultaneously calculate the global average resource consumption of all active tenants within the same window. The tenant load disturbance coefficient is calculated based on the ratio of the difference between the two to the global average. This coefficient represents the deviation of the current tenant from the group baseline, rather than the absolute value of its resource consumption.

[0103] After calculation, the system compares the TLPC value with a preset anomaly threshold. When the TLPC exceeds the threshold, the tenant is determined to be a tenant with abnormal resource consumption, and an isolation policy is triggered. Specifically, this involves adjusting the tenant's allocation weight or data storage priority in shared storage resource scheduling, thereby reducing its potential interference with the normal operation of other tenants. The anomaly threshold can preferably be dynamically determined using the 95th percentile of historical data.

[0104] It's important to note that within normal load ranges, TLPC uses relative deviation as the criterion, making it less affected by overall system load fluctuations compared to absolute threshold methods. When the global average is low, the deviation is normalized by the baseline value in the denominator, keeping the judgment metric relatively stable across different load levels. Conversely, when the global average is high, anomaly detection is only triggered when a tenant's deviation is sufficiently significant. This is the advantage of relative deviation over absolute threshold detection methods.

[0105] The beneficial effects of the above technical solution are as follows: Traditional solutions typically use absolute values ​​of resource consumption to set thresholds for anomaly detection. This approach has inherent drawbacks in multi-tenant scenarios: when the overall system load fluctuates significantly, a fixed threshold is insufficient to handle both missed detections during low load periods and false alarms during high load periods. The technical solution provided in this embodiment introduces relative deviation (i.e., Tenant Load Disturbance Coefficient TLPC) as a criterion. It identifies abnormal tenants based on the degree of deviation of a single tenant's resource consumption from the global average level. This reduces the sensitivity to the overall system load level compared to absolute threshold solutions and can reliably identify individual tenants whose resource usage patterns deviate from the normal range across different load intervals. Furthermore, this solution introduces a low-load detection condition: TLPC calculation is triggered only when the global average resource consumption exceeds a preset threshold; otherwise, it is set to zero. This avoids amplified values ​​and misjudgments caused by the denominator approaching zero when the system is idle, ensuring the stability and reliability of the algorithm across the entire load range.

[0106] Building upon this, the isolation strategy enables precise targeting: only tenants deemed abnormal are adjusted, avoiding the crude approach of uniformly processing all high-consumption tenants and reducing the probability of inadvertently harming normal tenants during isolation operations. Furthermore, since TLPC's computation relies solely on each tenant's own resource consumption data (CPU core count or memory usage) and does not involve document content parsing or changes to storage structures, its computation process can run independently without affecting the main document editing and saving workflow, resulting in low engineering intrusion.

[0107] As an optional embodiment, the server may further include the following steps in logically isolating and storing data for different tenants based on the tenant's unique identifier:

[0108] Step B1: Obtain the total number of currently active tenants. The sum of resource consumption of all currently active tenants ;according to Determine the average resource consumption of all active tenants. Get the total system resource capacity Determine the standard deviation of resource consumption among all active tenants based on their current resource consumption. ;

[0109] The "active state" refers to a tenant having at least one successfully processed document operation request within a preset observation time window. Non-negative integers; subscript This represents the total resource consumption of all active tenants, indicated by the subscript. Represents all tenants, subscript Indicates standard deviation, subscript This indicates resource consumption; the resource consumption is expressed in units of CPU cores or memory megabytes. The range of values ​​is , It is a positive real number. The range of values ​​is Dimensions and Consistent;

[0110] Step B2, when the average resource consumption of all active tenants When it is greater than the preset second threshold, according to the , , and Determine the Logical Isolation Saturation Index (LISI) to avoid the coefficient of variation term when the overall system load is extremely low. (The calculation requires that the LISI value be met to trigger a misjudgment because the denominator approaches zero, causing an abnormally amplified value.)

[0111] when If the value is less than or equal to the second threshold, then LISI = 0, and no expansion or policy adjustment alarm is triggered. The second threshold can be set to the total system resource capacity. 0.5%.

[0112] Among them, according to the , , and The Logical Isolation Saturation Index (LISI) can be determined using the following formula:

[0113]

[0114] Wherein, LISI is a dimensionless non-negative real number; the LISI is determined by the base load rate. With imbalance correction term Together they constitute; the base load rate reflects the proportion of the total resource consumption of all active tenants to the total system capacity; the imbalance correction term includes This is the coefficient of variation of resource consumption for each tenant, used to quantify the degree of imbalance in resource consumption among tenants. In multi-tenant shared storage resource scenarios, the more uneven the resource consumption among tenants, the more likely the hot tenants with high resource consumption are to cause increased queuing latency in the shared storage I / O scheduling queue, thus indirectly affecting the storage response speed of other tenants. Therefore, this degree of imbalance should be used as an amplification factor for isolation pressure. The larger this index value, the more saturated the overall isolation resources of the system are and the more uneven the load, the higher the risk of resource competition among tenants and the breach of isolation boundaries. When the threshold value is exceeded, it indicates that the isolation saturation index has exceeded the baseline value when the system is fully loaded due to a significant imbalance in resource consumption among tenants. This threshold state can serve as a quantitative basis for triggering alarms or capacity expansion operations. In particular, when there is only one active tenant in the system, the standard deviation of resource consumption among tenants is considered. When the value is zero, the imbalance correction term is 1, and the logical isolation saturation index is equal to the base load rate.

[0115] Step B3: Store the calculated LISI value in the server cache or database using a timestamp as the index; The isolation and configuration control module compares the LISI value with a preset alarm threshold. When the LISI value is higher than the alarm threshold, it determines that the overall isolation pressure of the current system is too high, and triggers system expansion or adjustment of logical isolation storage strategy parameters.

[0116] The alarm threshold is determined by collecting all historical LISI values ​​within the same time period as the current observation time window over the past 7 natural days and calculating their 95th percentile; when the system has been running for less than 7 days, the alarm threshold is preferably set to 0.85.

[0117] System expansion refers to increasing system capacity by adding physical resources. Specific methods include: adding CPU cores, memory capacity, or storage space to existing servers (vertical expansion); increasing the number of server nodes and distributing tenants across more nodes (horizontal expansion); and expanding the IOPS quota or storage capacity of shared storage pools (storage expansion). Expansion directly increases the total system resource capacity. This causes the LISI value to decrease.

[0118] Adjusting Logical Isolation Storage (LISI) policy parameters refers to reducing the LISI value by changing resource allocation methods without increasing hardware resources. Specific methods may include: reducing the allocation weight of high-consuming tenants in the shared storage I / O scheduling queue, limiting the number of I / O requests they can initiate per second; migrating the data of high-consuming tenants from the shared tablespace to a separate tablespace or independent database instance; and adjusting the partitioning strategy or cache priority of tenants in shared storage to isolate the storage access of hot tenants from other tenants. The aim of these adjustments is to reduce the standard deviation of resource consumption among tenants. This makes the load distribution more balanced, thereby reducing the LISI value.

[0119] The beneficial effects of the above technical solution are as follows: Existing multi-tenant systems typically only focus on the total load rate when monitoring resource saturation, failing to reflect the structural imbalance in load distribution among tenants. In a multi-tenant shared storage resource architecture, even if the total load rate is at a moderate level, if a few tenants occupy the vast majority of resources, it may still cause serious performance interference.

[0120] The aforementioned technical solution constructs a Logical Isolation Saturation Index (LISI) and introduces a coefficient of variation as a correction factor, enabling the system to simultaneously perceive two dimensions: total load level and load distribution balance. Specifically, LISI incorporates both the base load rate (the proportion of total resource consumption to system capacity) and the coefficient of variation of resource consumption among tenants (the degree of load imbalance), achieving a multi-dimensional quantitative assessment of system isolation pressure. When the total load has not yet reached the warning line, but the LISI value exceeds the preset alarm threshold due to uneven distribution, the system can determine that the isolation pressure is too high and automatically trigger capacity expansion or policy parameter adjustments, achieving a closed-loop linkage between early warning and automated operation and maintenance. This overcomes the blind spot of traditional single-dimensional monitoring of the total load rate, allowing the system to detect potential performance interference risks caused by uneven resource distribution earlier, providing a window of opportunity for operation and maintenance intervention. The calculation of this indicator relies solely on resource consumption statistics at the system monitoring level, without involving document content parsing or storage structure changes, and can be calculated online without affecting the main document editing and saving process.

[0121] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. This disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A document editor SaaS platform system supporting multi-tenancy, characterized in that, include: The document operation request processing module is used to obtain the unique identifier of the tenant corresponding to the client based on the client's document operation request, and bind the unique identifier of the tenant to the server. The isolation and configuration control module is used by the server to logically isolate and store data of different tenants based on the tenant's unique identifier, and to configure function permissions when the client initiates an editor initialization configuration request. The verification and saving module is used to change the save request based on the client's document content. After the server completes the tenant's unique identifier verification, it performs the save operation.

2. The document editor SaaS platform system according to claim 1, characterized in that, The document operation request processing module is used to obtain the tenant unique identifier corresponding to the client based on the client's document operation request, and bind the tenant unique identifier to the server, including: Receive document operation requests initiated by clients in real time; Extract the identity token from the request header corresponding to the document operation request, and parse the identity token to obtain the tenant's unique identifier carried in the identity token; The tenant's unique identifier is bound to the context variable of the current server's request thread.

3. The document editor SaaS platform system according to claim 1, characterized in that, The isolation and configuration control module is used by the server to logically isolate and store data from different tenants based on the tenant's unique identifier, and to configure function permissions when the client initiates an editor initialization configuration retrieval request, including: The server performs database read and write operations based on the tenant's unique identifier. During the database read and write operation, the data access layer interceptor automatically concatenates filter conditions containing the tenant field for all structured query language statements and automatically fills in the tenant field to achieve logical isolation storage of data from different tenants. Real-time monitoring to see if the client has received an editor initialization configuration retrieval request; When a client sends a request to retrieve editor initialization configuration, the system queries the cache or database for the corresponding function license configuration item based on the tenant's unique identifier. The function license configuration item is initialized to complete the function license configuration, and the initialization parameters corresponding to the function license configuration item are returned to the client. After receiving the initialization parameters corresponding to the function license configuration item, the client controls the display or hiding state of the corresponding function controls on the editor interface according to the function license configuration.

4. The document editor SaaS platform system according to claim 1, characterized in that, The verification and saving module is used to change the save request based on the client's document content. After the server completes the tenant's unique identifier verification, it performs the save operation, including: Real-time monitoring to see if a request to save document content changes submitted by the client is received; When a document content change and save request is received from the client, the unique identifier of the tenant corresponding to the client is extracted from the request context, request header or request parameters of the document content change and save request, and the document identifier corresponding to the document content change and save request is extracted from the interface route or request parameters of the document content change and save request. Send the unique tenant identifier corresponding to the client and the document identifier corresponding to the document content change save request to the server. After receiving the tenant unique identifier corresponding to the client and the document identifier corresponding to the document content change save request, the server performs a consistency check between the currently received tenant unique identifier corresponding to the client and the tenant unique identifier in the thread context variable. If the tenant unique identifier corresponding to the currently received client matches the tenant unique identifier in the thread context variable, then the client is allowed to execute the operation corresponding to the document content change save request, and the document content after the operation is stored in the storage path named after the tenant unique identifier.

5. A method for implementing a multi-tenant document editor SaaS platform system, characterized in that, include: Based on the client's document operation request, obtain the unique tenant identifier corresponding to the client, and bind the unique tenant identifier to the server. The server stores data for different tenants in logical isolation based on the tenant's unique identifier, and performs function permission configuration when the client initiates an editor initialization configuration retrieval request. Based on the client's request to save document content changes, the server performs the save operation after verifying the tenant's unique identifier.

6. The implementation method of the document editor SaaS platform system according to claim 5, characterized in that, Based on the client's document operation request, obtain the unique tenant identifier corresponding to the client, and bind the unique tenant identifier to the server, including: Receive document operation requests initiated by clients in real time; Extract the identity token from the request header corresponding to the document operation request, and parse the identity token to obtain the tenant's unique identifier carried in the identity token; The tenant's unique identifier is bound to the context variable of the current server's request thread.

7. The implementation method of the document editor SaaS platform system according to claim 5, characterized in that, The server logically isolates and stores data for different tenants based on the tenant's unique identifier, and configures function permissions when the client initiates an editor initialization configuration retrieval request, including: The server performs database read and write operations based on the tenant's unique identifier. During the database read and write operation, the data access layer interceptor automatically concatenates filter conditions containing the tenant field for all structured query language statements and automatically fills in the tenant field to achieve logical isolation storage of data from different tenants. Real-time monitoring to see if the client has received an editor initialization configuration retrieval request; When a client sends a request to retrieve editor initialization configuration, the system queries the cache or database for the corresponding function license configuration item based on the tenant's unique identifier. The function license configuration item is initialized to complete the function license configuration, and the initialization parameters corresponding to the function license configuration item are returned to the client. After receiving the initialization parameters corresponding to the function license configuration item, the client controls the display or hiding state of the corresponding function controls on the editor interface according to the function license configuration.

8. The implementation method of the document editor SaaS platform system according to claim 5, characterized in that, Based on the client's request to save document content changes, the server performs a save operation after verifying the tenant's unique identifier, including: Real-time monitoring to see if a request to save document content changes submitted by the client is received; When a document content change and save request is received from the client, the unique identifier of the tenant corresponding to the client is extracted from the request context, request header or request parameters of the document content change and save request, and the document identifier corresponding to the document content change and save request is extracted from the interface route or request parameters of the document content change and save request. Send the unique tenant identifier corresponding to the client and the document identifier corresponding to the document content change save request to the server. After receiving the tenant unique identifier corresponding to the client and the document identifier corresponding to the document content change save request, the server performs a consistency check between the currently received tenant unique identifier corresponding to the client and the tenant unique identifier in the thread context variable. If the tenant unique identifier corresponding to the currently received client matches the tenant unique identifier in the thread context variable, then the client is allowed to execute the operation corresponding to the document content change save request, and the document content after the operation is stored in the storage path named after the tenant unique identifier.