Encrypted data transmission method and system based on SaaS, electronic equipment and storage medium

Through data verification of hybrid encryption and asynchronous transmission combined with tenant business rules, data transmission security and efficiency problems in the integration of the tenant management platform and SaaS system are solved, and efficient and secure multi-tenant data transmission is achieved.

CN120281535APending Publication Date: 2025-07-08NANJING MAITEWANG SCI & TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510432648.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-08
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

In the process of integrating the tenant management platform with SaaS system, data transmission security is insufficient, and it is difficult to take into account the specific security needs of different tenants. Key management is complex. Traditional encryption methods have the risk of key leakage in multi-tenant scenarios, and data verification is not flexible enough, which affects the normal operation and efficiency of the business.

Method used

The hybrid encryption method is used to combine symmetric and asymmetric encryption to generate initial key seeds based on the tenant's unique identification, registration time and business type, and data formatting and asynchronous transmission are performed, and logical verification is performed in combination with tenant's business rules. A key exchange protocol with multi-level access control and ECC encryption is used to update the key periodically.

Benefits of technology

Customized encryption solutions for different tenants are realized, which improves data transmission security and efficiency, reduces business exceptions caused by data errors, ensures the security and availability of key management, and improves the accuracy of data transmission and system response speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120281535A_ABST
    Figure CN120281535A_ABST
Patent Text Reader

Abstract

The invention provides an encrypted data transmission method and system based on SaaS, electronic equipment and a storage medium, and relates to the technical field of cloud computing, data security and system integration. According to the method, the initial key seed is generated based on the information such as the unique identifier of the tenant, the registration time and the service type, the encryption key and the verification key are further derived, and an encryption scheme can be customized according to the unique security requirements of different tenants. For example, e-commerce tenants have high requirements on transaction data confidentiality, and the method can generate a high-strength encryption key; the tenants of the project collaboration SaaS system pay attention to the efficiency, and the method optimizes the encryption process and improves the data processing speed on the premise of ensuring the security. Meanwhile, data formatting is carried out according to different SaaS system data format requirements, the contradiction between encryption universality and specific requirements is effectively solved, and each SaaS system can receive and process encrypted data in an adaptive format.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical fields of cloud computing, data security, and system integration, and particularly relates to an encrypted data transmission method, system, electronic device, and storage medium based on SaaS. Background Art

[0002] With the development of cloud computing technology, the SaaS model has been widely applied. Many enterprises will use a unified tenant management platform to centrally and efficiently manage multiple tenants of the SaaS system. However, in the process of integrating the tenant management platform with the SaaS system, the security of data transmission is crucial.

[0003] Common data transmission encryption methods have some defects. For example, although the traditional symmetric encryption algorithm has a fast encryption speed, the key management is complex. In a multi-tenant scenario, if the same key is used for different tenant data, once the key is leaked, all tenant data is at risk; if different keys are assigned to each tenant, the difficulty of key distribution and storage increases. The asymmetric encryption algorithm, although the key management is relatively simple, is not flexible enough in the data verification link, the integrity verification of data is not perfect, it is difficult to customize the verification according to the specific business rules of different tenants, and it is impossible to effectively detect whether the data has been tampered with due to business logic errors during the transmission process. Summary of the Invention

[0004] Object of the Invention: Based on the problems raised in the above background art, an encrypted data transmission method, system, electronic device, and storage medium based on SaaS are proposed to solve the above problems existing in the prior art.

[0005] In the first aspect of the present invention, an encrypted data transmission method based on SaaS is proposed, and the steps are as follows: Start the tenant management platform, establish a connection with the database storing tenant information, load the system configuration file, read the relevant information of all tenants and load it into memory; The SaaS system registers with the tenant management platform, providing data format requirements, encryption algorithm support, and business interface information; Configure the key generation environment, establish a connection with the security database, initialize the key storage table structure, and set multi-level access control permissions; Obtain the business data to be sent and perform preprocessing; Obtain the corresponding encryption key and verification key according to the tenant ID, and verify the authenticity and integrity of the key; Format the preprocessed data and encrypt the data using a hybrid encryption method; Encapsulate the encrypted data, the encrypted symmetric encryption key, and relevant metadata into a data packet, and send it to the target SaaS system through an asynchronous transmission method; The SaaS system receives data packets and parses out the encrypted data, the encrypted symmetric encryption key, and the metadata; Use the private key to decrypt the symmetric encryption key, and then use this key to decrypt the data; Perform integrity verification and business logic verification on the decrypted data; After the verification passes, process the data, generate a response data packet, and encrypt and return it to the tenant management platform; Generate an initial key seed based on the tenant unique identifier, registration time, and business type, and derive an encryption key and a verification key; Encrypt and store the key, update the key regularly or on demand, and distribute the key through a key exchange protocol based on ECC encryption; Switch between the old and new keys in a step-by-step transition manner.

[0006] In a further embodiment of the first aspect, the data can be encrypted using a hybrid encryption method with a multi-factor dynamic encryption algorithm, which combines time factor, tenant identity factor, and data characteristic factor to derive the encryption key; the time factor is generated by hashing the concatenation of the current time and the master key, the tenant identity factor is generated by encoding the tenant ID, and the data characteristic factor is generated by hashing the concatenation of the data hash value, length, and type.

[0007] In a further embodiment of the first aspect, the data can also be encrypted using a distributed hash encryption algorithm when using the hybrid encryption method to encrypt the data. The data is sharded and distributed to multiple nodes for parallel encryption, and the results of the nodes are integrated to obtain the complete encrypted data; each node uses the local key to encrypt and hash the data block, and verifies the data integrity through the same node distribution rule during decryption.

[0008] In a further embodiment of the first aspect, the formatting of the preprocessed data includes: converting the data into JSON format or unstructured data encoded in Base64 according to the requirements of the target SaaS system.

[0009] In a further embodiment of the first aspect, the sending to the target SaaS system by an asynchronous transmission method includes: putting the data packet into a cache queue and sending it through a secure network protocol customized based on the TLS protocol.

[0010] In a further embodiment of the first aspect, the business logic verification includes: checking the amount and inventory key information of the tenant order data to ensure that the data complies with the business rules.

[0011] In a further embodiment of the first aspect, the derivation of the encryption key and the verification key includes: using the HKDF function to derive a 256-bit encryption key and a 128-bit verification key from the initial key seed.

[0012] In a second aspect of the present invention, an encrypted data transmission system is proposed. The device includes a tenant management platform, a SaaS system, a first configuration module, a second configuration module, a third configuration module, a fourth configuration module, a fifth configuration module, a decryption module, a verification module, a first encryption module, a second encryption module, a third encryption module, and a fourth encryption module.

[0013] When the tenant management platform is started, a database connection with the database storing tenant information is established, the system configuration file is loaded, and all relevant information of all tenants is read and loaded into the memory. The SaaS system is used to register with the tenant management platform, providing data format requirements, encryption algorithm support, and business interface information. The first configuration module is used to configure the key generation environment, establish a connection with the security database, initialize the key storage table structure, and set multi-level access control permissions. The second configuration module is used to obtain the business data to be sent and perform preprocessing. The third configuration module obtains the corresponding encryption key and verification key according to the tenant ID, and verifies the authenticity and integrity of the key. The fourth configuration module is used to format the preprocessed data and encrypt the data using a hybrid encryption method. The fifth configuration module is used to encapsulate the encrypted data, the encrypted symmetric encryption key, and related metadata into a data packet, and send it to the target SaaS system through an asynchronous transmission method; the SaaS system receives the data packet and parses out the encrypted data, the encrypted symmetric encryption key, and the metadata. The decryption module uses the private key to decrypt the symmetric encryption key, and then uses this key to decrypt the data. The verification module is used to perform integrity verification and business logic verification on the decrypted data. The first encryption module is used to process the data after verification passes, generate a response data packet, and encrypt it and return it to the tenant management platform. The second encryption module generates an initial key seed based on the tenant unique identifier, registration time, and business type, and derives the encryption key and verification key. The third encryption module is used to encrypt and store the key, update the key regularly or as needed, and distribute the key through a key exchange protocol based on ECC encryption. The fourth encryption module switches the old and new keys in a step-by-step transition manner.

[0014] In a third aspect of the present invention, an electronic device is provided, which includes: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the encryption data transmission method described in the first aspect is implemented.

[0015] In a fourth aspect of the present invention, a computer-readable storage medium is provided, in which at least one executable instruction is stored. When the executable instruction runs on an electronic device, the electronic device is caused to execute the encryption data transmission method described in the first aspect.

[0016] Compared with the prior art, the present invention has at least the following beneficial effects: (1) By generating an initial key seed based on information such as the tenant's unique identifier, registration time, and business type, and then deriving an encryption key and a verification key, an encryption scheme can be customized according to the unique security requirements of different tenants. For example, e-commerce tenants have high requirements for the confidentiality of transaction data, and this method can generate high-strength encryption keys; while tenants of project collaboration SaaS systems focus on efficiency, and this method optimizes the encryption process on the premise of ensuring security and improves data processing speed. At the same time, data formatting is performed according to the data format requirements of different SaaS systems, effectively solving the contradiction between encryption generality and specific requirements, and enabling each SaaS system to receive and process encrypted data in an adapted format.

[0017] (2) Not only uses the hash algorithm to ensure data integrity, but also combines tenant business rules for logical verification. For example, key information such as the amount and inventory of tenant order data is checked to prevent data that does not conform to business logic from entering the system, greatly reducing business exceptions caused by data errors. Compared with the traditional method of only verifying data integrity, it is more suitable for the actual business scenarios of multi-tenants and improves the accuracy and availability of data.

[0018] (3) A hybrid encryption method combining symmetric encryption and asymmetric encryption is adopted. Symmetric encryption ensures fast data encryption, and asymmetric encryption guarantees the security of key transmission, taking into account both security and efficiency. Asynchronous transmission and a cache queue mechanism are used for data transmission to reduce data transmission latency and improve the system response speed. A secure network protocol customized based on TLS enhances the protection of specific data types and ensures the security and efficiency of a large amount of data transmission in a complex network environment, achieving a balance between data interaction security and efficiency under multi-system integration.

[0019] (4) The tenant management platform stores keys using a multi-level access control mechanism, greatly reducing the risk of key leakage. Keys are updated regularly or on demand, and a gradual transition method is adopted to ensure both the continuity of data transmission and timely response to potential security threats. The keys are distributed and digitally signed through a key exchange protocol based on ECC encryption to ensure the security and authenticity of key distribution, effectively solving the complexity problem of key management in a multi-tenant scenario and ensuring the overall security of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the accompanying drawings required for the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings, where: Figure 1 It is a data sending flow chart in the embodiment.

[0021] Figure 2 It is a data receiving flow chart in the embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0022] In the following description, a large number of specific details are given to provide a more thorough understanding of the present invention. However, it is obvious to those skilled in the art that the present invention can be implemented without one or more of these details. In other examples, some well-known technical features are not described to avoid confusion with the present invention.

[0023] The applicant's research finds that the currently common encryption methods are highly versatile, but in the scenario of integrating the tenant management platform with the SaaS system, it is difficult to meet the specific security requirements of different SaaS systems and tenants. Different SaaS systems have different requirements for data confidentiality, integrity, and availability due to different business functions and service objects. Existing general encryption methods cannot take into account these diverse requirements, resulting in a large amount of custom development during integration, increasing costs and complexity.

[0024] Existing data verification mechanisms mostly focus on data integrity and prevent data from being tampered with through methods such as hash value comparison. However, in the integration of the tenant management platform and the SaaS system, the business logics of different tenants vary greatly, and only ensuring data integrity is not sufficient to ensure the accurate availability of data. Traditional verification methods cannot perform targeted verification based on the business logics of different tenants, which may allow data that does not conform to business rules to enter the system and affect the normal operation of the business.

[0025] When integrating multiple SaaS systems with a tenant management platform, it is necessary to ensure both data transmission security and maintain efficient data interaction. Traditional encryption methods have high encryption and decryption computational overheads in complex network environments and large-scale data transmissions, resulting in data transmission delays and affecting the system response speed. In addition, the data interaction process between multiple systems is complex, and existing encryption technologies lack comprehensive protection for the interaction process. For example, security vulnerabilities are likely to occur during key exchange and data routing, making it difficult to achieve a good balance between security and efficiency.

[0026] In a multi-tenant environment, key management becomes extremely complex when providing secure encryption services for each tenant. If the same key is used, once it is leaked, the data of all tenants is at risk; if different keys are assigned to each tenant, the difficulty of key generation, storage, distribution, and update increases. Existing key management solutions are difficult to efficiently meet the key management requirements in multi-tenant scenarios and cannot ensure the security and availability of keys throughout their lifecycle, affecting the overall security of data transmission. Embodiment 1

[0027] This embodiment discloses an SaaS-based encrypted data transmission method, which will be described from four aspects: system architecture, encryption method, data transmission process, and key management mechanism.

[0028] 1. System architecture This encrypted data transmission method is applied to an architecture in which a tenant management platform is integrated with multiple SaaS systems. The tenant management platform serves as the core hub, responsible for uniformly managing multi-tenant information and interacting with each SaaS system. This architecture mainly includes the following key parts: Tenant management platform: Stores and manages all tenant-related information, including but not limited to tenant basic information, permission settings, etc. At the same time, as the data sender, it is responsible for encrypting the data to be transmitted to the SaaS system and decrypting and verifying the data received from the SaaS system.

[0029] SaaS system: Multiple SaaS systems with different functions, each handling specific business logics. They receive encrypted data from the tenant management platform, decrypt it, and perform business processing.

[0030] 2. Encryption method Key generation: Initial key seed generation: Based on information such as the tenant's unique identifier, registration time, business type, etc., combined with the system's current timestamp, an initial key seed is generated. For example, the tenant ID, registration time, business type, and the current timestamp are concatenated, and then a 256-bit initial key seed is generated through the SHA-256 hash algorithm.

[0031] Encryption Key and Verification Key Derivation: Using a key derivation function (KDF), appropriate-length encryption keys and verification keys are derived from the initial key seed. For example, using HKDF, by setting different salt values and information parameters, a 256-bit encryption key and a 128-bit verification key are generated respectively. The encryption key is used for data encryption operations, and the verification key is used for subsequent data verification processes.

[0032] Data Encryption and Encapsulation: Data Formatting: At the data sending end, the data to be transmitted is preprocessed according to the data format requirements of the target SaaS system. For structured data (such as database records), it is converted into JSON or XML format; for unstructured data, it is converted through Base64 encoding.

[0033] Hybrid Encryption: A hybrid encryption method that combines the advantages of symmetric encryption and asymmetric encryption is adopted. First, the formatted data is quickly encrypted using a symmetric encryption algorithm. The symmetric encryption key is randomly generated for each data transmission. Then, the symmetric encryption key is encrypted using an asymmetric encryption algorithm. This not only utilizes the high efficiency of symmetric encryption but also ensures the security of key transmission.

[0034] Data Encapsulation: The encrypted data, the encrypted symmetric encryption key, and related metadata (such as data type, encryption algorithm identifier, timestamp, etc.) are encapsulated in a specific format. For example, a custom data structure is constructed, including an encrypted data field, an encrypted key field, and a metadata field, to form a data packet to be transmitted.

[0035] Data Verification: Decryption and Recovery: At the data receiving end, first, information such as the encrypted data and the encrypted symmetric encryption key is parsed from the metadata in the data packet. The corresponding asymmetric encryption private key is used to decrypt the symmetric encryption key, and then the symmetric encryption key is used to decrypt the original data.

[0036] Integrity Verification: A hash value is generated by performing a hash operation on the original data using the verification key. This hash value is compared with the hash value generated by the sending end carried in the data packet. If the two are consistent, it is initially considered that the data has not been tampered with during transmission, and the data integrity is ensured.

[0037] Business Logic Verification: The recovered original data is logically verified in combination with the tenant's business rules. For example, for the order data of an e-commerce tenant, check whether the order amount is equal to the product unit price multiplied by the product quantity, and whether the product inventory is sufficient, etc. If the data does not conform to the business logic rules, the data is determined to be invalid, discarded, and an error feedback is sent to the sending end.

[0038] 3. Data Transmission Process Sending Process: Data Preparation: The tenant management platform collects and organizes the data to be sent to a specific SaaS system according to business requirements.

[0039] Key Acquisition: Request the tenant management platform to obtain the encryption key and verification key for the corresponding tenant.

[0040] Data Encryption and Encapsulation: Encrypt and encapsulate the data according to the data encryption and encapsulation steps in the above custom encryption method to generate the data packet to be sent.

[0041] Asynchronous Transmission: Put the data packet into the cache queue, retrieve the data packet from the cache queue through an asynchronous thread, and send the data packet to the target SaaS system using a secure network protocol. During the sending process, assign a unique identifier to each data packet and record its sending status.

[0042] Receiving Process: Data Reception: After the SaaS system receives the data packet from the tenant management platform, store it in the temporary buffer.

[0043] Data Decryption and Verification: Decrypt, perform integrity verification and business logic verification on the data packet according to the data verification steps in the custom encryption method.

[0044] Response Processing: If the data verification passes, the SaaS system processes the data, encrypts and encapsulates the processing result in the same encryption method and returns it to the tenant management platform. If the data verification fails, the SaaS system discards the data and sends an error feedback to the tenant management platform, informing that the data verification fails.

[0045] Feedback Processing: After the tenant management platform receives the feedback from the SaaS system, if it is an error feedback, find the corresponding sending record according to the identifier of the data packet, and re - encrypt and send the data; if it is normal response data, decrypt and perform subsequent processing.

[0046] 4. Key Management Mechanism Key Generation and Storage: The tenant management platform generates a unique encryption key and verification key pair for each tenant. The keys are stored in an encrypted form in a secure database, adopting a multi - level access control mechanism, and only authorized tenant management platforms and related modules can access.

[0047] Key Update: Regularly or when a specific event is triggered, the tenant management platform generates a new key pair for the tenant and securely distributes the new keys to the relevant SaaS systems. During the key update process, adopt a gradual transition method to ensure the continuity and security of data transmission.

[0048] Key Distribution: When the tenant management platform needs to integrate with a new SaaS system or update keys, the tenant management platform distributes the relevant keys to the corresponding SaaS system through a secure channel. During the distribution process, the keys are digitally signed to ensure their authenticity and integrity. Embodiment 2

[0049] Based on Embodiment 1, combined with Figure 1 and Figure 2 , the process of the SaaS-based encrypted data transmission method is elaborated in detail below.

[0050] 1. System Initialization 1.1 Tenant Management Platform Initialization Database Connection and Configuration Loading: When the tenant management platform starts, it first establishes a connection with the database storing tenant information. At the same time, it loads the system configuration file, which contains parameters required for integration with each SaaS system, such as the address of the SaaS system, data format requirements, interaction protocols, etc.

[0051] Tenant Information Loading: Read all relevant information of tenants from the database, including tenant ID, registration time, business type, permission settings, etc., and load this information into memory for subsequent quick access and processing.

[0052] 1.2 SaaS System Initialization System Registration and Configuration: When each SaaS system starts, it registers with the tenant management platform, providing information such as its own data format requirements, supported encryption algorithms, business interfaces, etc. The tenant management platform records this information in the system configuration and establishes a connection with the corresponding SaaS system.

[0053] 1.3 Key Management Initialization Key Generation Environment Configuration: When the tenant management platform starts, it configures the environmental parameters required for key generation, such as the hash algorithm library, key derivation function library, etc. Ensure the version compatibility and security of these libraries.

[0054] Database Connection and Key Storage Preparation: Establish a connection with the secure database storing keys and initialize the database table structure for storing the encryption keys and verification keys of each tenant. At the same time, set multi-level access control permissions so that only authorized internal modules of the tenant management platform can access key data.

[0055] 2. Implementation of Data Sending Process 2.1 Data Preparation Business data acquisition: The tenant management platform retrieves data to be sent to a specific SaaS system from relevant data sources (such as databases, file systems, etc.) according to business logic. For example, for the order data of an e-commerce tenant, eligible order records are queried and retrieved from the order database.

[0056] Data preprocessing: Perform preliminary processing on the retrieved data, such as data cleaning, format standardization, etc. Ensure the accuracy and consistency of the data for subsequent encryption and transmission operations.

[0057] 2.2 Key acquisition Key request: The tenant management platform obtains the encryption key and verification key corresponding to the tenant. The request contains identification information such as the tenant ID to accurately locate and return the corresponding key.

[0058] Key reception and verification: After receiving the request, the tenant management platform queries and retrieves the corresponding encryption key and verification key from the security database. Then, use digital signature technology to sign the key and obtain the signed key. After the tenant management platform obtains the key, verify the signature of the key to ensure the authenticity and integrity of the key.

[0059] 2.3 Data encryption and encapsulation Data formatting: Format the preprocessed data according to the data format requirements of the target SaaS system. For example, if the target SaaS system requires the data to be in JSON format, convert the structured data into a JSON string. For unstructured data, such as text files, perform Base64 encoding conversion.

[0060] Hybrid encryption operation: Symmetric encryption: Randomly generate an AES-256 symmetric encryption key (using an optimized block mode, such as CBC mode and combined with a custom initialization vector generation method). Use this symmetric encryption key to encrypt the formatted data to generate an encrypted data block.

[0061] Asymmetric encryption: Use an asymmetric encryption algorithm improved based on the elliptic curve cryptosystem ECC to encrypt the randomly generated symmetric encryption key using the public key of the target SaaS system (obtained and stored during system initialization) to obtain the encrypted symmetric encryption key.

[0062] Data encapsulation: Construct a custom data structure and fill the encrypted data block, the encrypted symmetric encryption key, and relevant metadata (such as data type, encryption algorithm identifier, timestamp, etc.) into this data structure.

[0063] 2.4 Asynchronous transmission Cache queue operation: Put the encapsulated data packet into the cache queue.

[0064] Asynchronous thread sending: Start one or more asynchronous threads to retrieve data packets from the cache queue for sending. In each asynchronous thread, send the data packets to the target SaaS system according to a security network protocol customized based on the TLS protocol. During the sending process, assign a unique identifier (such as UUID) to each data packet and record its sending status (such as sent, waiting for confirmation, etc.).

[0065] 3. Implementation of data reception process 3.1 Data reception Network listening and reception: The SaaS system starts a network listening service to listen for data packets from the tenant management platform. When a data packet is received, store it in a temporary buffer for further processing.

[0066] 3.2 Data decryption and verification Data packet parsing: Retrieve the data packet from the temporary buffer and parse out the encrypted data, the encrypted symmetric encryption key, and the metadata according to a custom data structure format.

[0067] Decryption operation: Asymmetric decryption: Use its own private key (the private key corresponding to the asymmetric encryption algorithm improved based on the elliptic curve cryptography ECC) to decrypt the encrypted symmetric encryption key to obtain the original symmetric encryption key.

[0068] Symmetric decryption: Use the decrypted symmetric encryption key to decrypt the encrypted data to restore the original data.

[0069] Integrity verification: Use the verification key (obtained from the tenant management platform and stored during system initialization) to perform SHA-512 hashing on the restored original data to generate a hash value. Compare this hash value with the hash value generated by the sender carried in the data packet. If the two are consistent, it is initially considered that the data has not been tampered with during transmission and the data integrity is guaranteed.

[0070] Business logic verification: Combine the tenant's business rules to perform logical verification on the restored original data. For example, for the order data of an e-commerce tenant, check whether the order amount is equal to the product unit price multiplied by the product quantity, and whether the product inventory is sufficient, etc. If the data does not conform to the business logic rules, determine that the data is invalid, discard the data, and send an error feedback to the tenant management platform.

[0071] 3.3 Response handling Business processing: If the data verification passes, the SaaS system processes the data according to its own business logic. For example, for order data, update the inventory, generate order confirmation information, etc.

[0072] Response Encryption and Encapsulation: Encrypt and encapsulate the business processing result in the same encryption method as the received data. That is, first randomly generate a new symmetric encryption key, use this key to perform symmetric encryption on the processing result, and then use the public key of the tenant management platform (obtained and stored during system initialization) to perform asymmetric encryption on the symmetric encryption key. Finally, encapsulate the encrypted data, the encrypted symmetric encryption key, and related metadata into a response data packet.

[0073] Response Sending: Send the response data packet back to the tenant management platform. The sending process can also adopt a customized secure network protocol based on the TLS protocol, and assign a unique identifier to each response data packet and record the sending status.

[0074] 3.4 Feedback Processing Feedback Receiving and Parsing: After the tenant management platform receives the feedback data packet from the SaaS system, it parses and decrypts it in the same way as the received data.

[0075] Processing Result Judgment: If the feedback data indicates that the data verification fails, the tenant management platform searches for the corresponding sending record according to the identifier of the data packet and re-performs the data encryption and sending operations. If the feedback data is a normal business response, decrypt the response data and perform subsequent processing, such as updating relevant records in the local database, presenting to the user, etc.

[0076] 4. Key Management Mechanism Implementation 4.1 Key Generation and Storage Key Generation: The tenant management platform uses the method described above for generating the initial key seed based on information such as the tenant's unique identifier, registration time, business type, and the system's current timestamp to generate an initial key seed for each tenant. Then, use a key derivation function (such as HKDF) to derive a 256-bit encryption key and a 128-bit verification key from the initial key seed respectively.

[0077] Key Encryption and Storage: Encrypt the generated encryption key and verification key using a high-strength encryption algorithm (such as AES-256). The encryption key is securely stored inside the tenant management platform. Store the encrypted key in a secure database, and at the same time record the corresponding tenant ID and other relevant information.

[0078] 4.2 Key Update Regular Update: The tenant management platform generates a new pair of encryption key and verification key for each tenant according to a preset time period (such as the early morning of the first day of each month). The generation process is the same as the initial key generation process.

[0079] Event - Triggered Update: When potential key leakage risks are detected (such as abnormal key access attempts, system security vulnerabilities, etc.), immediately generate a new key pair for the relevant tenants.

[0080] Key Distribution and Transition: Secure Distribution: Through an ECC - based key exchange protocol, securely distribute the newly generated keys to the tenant management platform and relevant SaaS systems. During the distribution process, digitally sign the keys to ensure the authenticity and integrity of the keys.

[0081] Gradual Transition: After receiving the new keys, the tenant management platform and SaaS systems do not immediately stop using the old keys. Instead, within a certain period (such as one week), use both the old and new keys for data encryption and decryption operations. During this transition period, gradually switch data processing to the new keys to ensure the continuity and security of data transmission. After one week, stop using the old keys and delete the relevant old key records.

[0082] 4.3 Key Distribution New Integration Distribution: When the tenant management platform needs to integrate with a new SaaS system, the tenant management platform distributes the encrypted key and verification key of the corresponding tenant to the tenant management platform and the new SaaS system through an ECC - based key exchange protocol. At the same time, digitally sign the keys. After receiving the keys, both parties verify the signature to ensure the authenticity and integrity of the keys.

[0083] Update Distribution: When performing key updates, distribute the new keys to the tenant management platform and relevant SaaS systems according to the above key update process. During the distribution process, also use an ECC - based key exchange protocol and digital signature technology to ensure the security of key distribution.

[0084] The logical hierarchical encryption algorithm is as follows:

[0085] Algorithm Principle: This algorithm combines time factors, tenant identity factors, and data characteristic factors to achieve dynamic encryption of data. Each factor plays a key role in the encryption process, collaborating with each other to enhance the security and adaptability of encryption.

[0086] Encryption Steps: Initialization: Let the plaintext be P and the master key be Kmaster. First, generate a time factor FT based on the current time T, FT = Hash(T||Kmaster), where Hash is a secure hash function and || represents the concatenation operation.

[0087] Tenant identity identification: Obtain the tenant ID, set it as IDtenant, and obtain the tenant identity factor FID through a specific encoding function Encode(IDtenant).

[0088] Data feature extraction: Extract features from the plaintext P, calculate the hash value of the data Hash(P), and generate the data feature factor FD = Hash(Hash(P)||L||Type) according to the data length L and data type Type.

[0089] Key derivation: Use the key derivation function KDF to derive the encryption key Kencrypt based on the master key Kmaster and the above three factors, Kencrypt = KDF(Kmaster,FT||FID||FD).

[0090] Encryption operation: Use a symmetric encryption algorithm (such as AES) to encrypt the plaintext P with the derived key Kencrypt to obtain the ciphertext C = AES(Kencrypt,P).

[0091] Decryption steps: Initialization: The receiver obtains the ciphertext C, and at the same time needs to have the master key Kmaster and information such as the same time, tenant ID, and data type as the sender.

[0092] Factor generation: Generate the time factor FT', tenant identity factor FID, and data feature factor FD' respectively according to the received time T' (ensuring that the time synchronization error is within an acceptable range), tenant ID, and known data type in the same way as encryption.

[0093] Key derivation: Use the same key derivation function KDF to derive the decryption key Kdecrypt based on the master key Kmaster and the newly generated factors, Kdecrypt = KDF(Kmaster,FT'||FID||FD').

[0094] Decryption operation: Use the symmetric decryption algorithm (corresponding to the AES algorithm used during encryption) to decrypt the ciphertext C with the derived key Kdecrypt to obtain the plaintext P' = AES^(-1)(Kdecrypt,C).

[0095] Advantages: The advantages of this algorithm lie in its dynamics and multi-factor characteristics. By introducing a time factor, the timeliness of encryption is increased, making it difficult for attackers to crack the encrypted data outside the time window; the tenant identity factor ensures the independence and security of different tenants' data; the data feature factor encrypts data according to its own characteristics, further enhancing the pertinence and security of encryption. This multi-factor dynamic encryption method can better adapt to the complex and changing security requirements in the integration of the tenant management platform and the SaaS system.

[0096] Algorithm principle: Based on the principle of the distributed hash table (DHT), the encryption process is distributed to multiple nodes to improve encryption efficiency and reliability. Each node is responsible for processing the hash calculation and encryption operation of a part of the data, and finally the complete encrypted data is obtained by integrating the results of each node.

[0097] Encryption steps: Data sharding: Split the plaintext P into n data blocks P1, P2,..., Pn.

[0098] Node allocation: In a distributed system, according to the load conditions and hash values of the nodes, each data block is allocated to different nodes. Let the node set be N = {N1, N2,..., Nm}, calculate the hash value Hash(Pi) of each data block through the hash function Hash, and allocate Pi to the corresponding node Nj according to the hash value, where j = Hash(Hash(Pi)) % m.

[0099] Node encryption: After each node Nj receives the data block Pi, it uses the local key Kj and the hash function H to perform encryption and hash calculation on the data block. First, calculate the hash value H(Pi), and then use the symmetric encryption algorithm (such as ChaCha20) to encrypt Pi and H(Pi) with the key Kj to obtain the encrypted ciphertext block Ci = ChaCha20(Kj, Pi || H(Pi)).

[0100] Result integration: Integrate the ciphertext blocks C1, C2,..., Cn generated by each node in the order of the original data blocks to obtain the final encrypted data C = C1 || C2 ||... || Cn.

[0101] Decryption steps: Data splitting: The receiver splits the received encrypted data C into n ciphertext blocks C1, C2,..., Cn in the original sharding order.

[0102] Node search: According to the pre-set node allocation rules, determine the decryption node corresponding to each ciphertext block. Through the same hash calculation method, find the node Nj corresponding to each ciphertext block Ci.

[0103] Node decryption: Node Nj uses the local key Kj to decrypt the received ciphertext block Ci to obtain the decrypted Pi' and H(Pi)'. Then, it verifies whether H(Pi)' is consistent with the recalculated H(Pi''), and if so, it indicates that the data integrity is verified, and Pi' is the correct decrypted data block.

[0104] Data merging: The data blocks P1', P2',..., Pn' decrypted by each node are merged in the original order to obtain the complete plaintext P'.

[0105] Advantages: The distributed hash encryption algorithm utilizes the parallel computing power of the distributed system, greatly improving the encryption and decryption efficiency. At the same time, since the encryption and decryption of data are distributed across multiple nodes, the failure of a single node will not affect the entire encryption process, enhancing the reliability and fault tolerance of the system. This algorithm is particularly suitable for handling the encryption transmission requirements of a large amount of data in the integration of the tenant management platform and the SaaS system.

[0106] The technical process of the SaaS-based encrypted data transmission method disclosed in the above embodiments can be implemented in whole or in part by software, hardware, firmware, or any arbitrary combination thereof.

[0107] When implemented using hardware, the above embodiments can, in whole or in part, run the working logic and calculation process on an electronic device after software compilation. The electronic device includes a processor, a memory, a communication interface, and a communication bus. The processor, the memory, and the communication interface complete communication with each other through the communication bus. The memory is used to store at least one executable instruction, and the executable instruction causes the processor to execute the technical process of the SaaS-based encrypted data transmission method disclosed in the above embodiments.

[0108] When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. If the above method is implemented in the form of software functional modules and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of the present application, in essence, or the part that contributes to the related technology, can be embodied in the form of a software product. The software product is stored in a storage medium and includes several instructions for causing an electronic device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in the embodiments of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), magnetic disks, or optical discs that can store program codes. Thus, the embodiments of the present application are not limited to any specific hardware, software, or firmware, or any arbitrary combination of hardware, software, and firmware.

[0109] As described above, although the present invention has been shown and described with reference to specific preferred embodiments, it should not be construed as a limitation on the present invention itself. Various changes may be made in its form and details without departing from the spirit and scope of the present invention as defined by the appended claims.

Claims

1. A SaaS-based encrypted data transmission method, characterized in that including: Start the tenant management platform, establish a database connection for storing tenant information, load the system configuration file, read the relevant information of all tenants and load it into memory; The SaaS system registers with the tenant management platform, providing data format requirements, encryption algorithm support, and business interface information; Configure the key generation environment, establish a connection with the security database, initialize the key storage table structure, and set multi-level access control permissions; Obtain the business data to be sent and perform preprocessing; Obtain the corresponding encryption key and verification key according to the tenant ID, and verify the authenticity and integrity of the key; Format the preprocessed data and encrypt the data using a hybrid encryption method; Encapsulate the encrypted data, the encrypted symmetric encryption key, and related metadata into a data packet, and send it to the target SaaS system through an asynchronous transmission method; The SaaS system receives the data packet and parses out the encrypted data, the encrypted symmetric encryption key, and metadata; Use the private key to decrypt the symmetric encryption key, and then use this key to decrypt the data; Perform integrity verification and business logic verification on the decrypted data; After the verification passes, process the data, generate a response data packet and encrypt it and return it to the tenant management platform; Generate an initial key seed based on the tenant unique identifier, registration time, and business type, and derive an encryption key and a verification key; Encrypt and store the key, update the key regularly or on demand, and distribute the key through a key exchange protocol based on ECC encryption; Switch the old and new keys in a step-by-step transition manner.

2. The SaaS-based encrypted data transmission method according to claim 1, wherein The encrypting the data using the hybrid encryption method includes: A multi-factor dynamic encryption algorithm that derives an encryption key by combining a time factor, a tenant identity factor, and a data feature factor; the time factor is generated by a hash function after concatenating the current time and the master key, the tenant identity factor is generated by an encoding function for processing the tenant ID, and the data feature factor is generated by a hash function after concatenating the data hash value, length, and type.

3. The SaaS-based encrypted data transmission method according to claim 1, wherein The encrypting the data using the hybrid encryption method further includes: A distributed hash encryption algorithm that slices the data and distributes it to multiple nodes for parallel encryption, and integrates the node results to obtain the complete encrypted data; each node uses a local key to encrypt and hash the data block, and verifies the data integrity through the same node distribution rule during decryption.

4. The SaaS-based encrypted data transmission method according to claim 1, wherein The formatting the preprocessed data includes: Convert the data into JSON format or unstructured data encoded in Base64 according to the requirements of the target SaaS system.

5. The SaaS-based encrypted data transmission method according to claim 1, wherein The sending it to the target SaaS system through the asynchronous transmission method includes: Put the data packet into the cache queue and send it through a security network protocol customized based on the TLS protocol.

6. The SaaS-based encrypted data transmission method according to claim 1, wherein The business logic verification includes: Check the amount and inventory key information of the tenant order data to ensure that the data complies with the business rules.

7. The SaaS-based encrypted data transmission method according to claim 1, characterized in that, The deriving the encryption key and the verification key includes: Use the HKDF function to derive a 256-bit encryption key and a 128-bit verification key from the initial key seed.

8. An encrypted data transmission system, characterized in that, including: Tenant management platform; When the tenant management platform is started, a database connection for storing tenant information is established, the system configuration file is loaded, and the relevant information of all tenants is read and loaded into memory; SaaS system; The SaaS system is used to register with the tenant management platform, providing data format requirements, encryption algorithm support, and business interface information; First configuration module; The first configuration module is used to configure the key generation environment, establish a connection with the security database, initialize the key storage table structure, and set multi-level access control permissions; Second configuration module; The second configuration module is used to obtain the business data to be sent and perform preprocessing; Third configuration module; The third configuration module obtains the corresponding encryption key and verification key according to the tenant ID, and verifies the authenticity and integrity of the key; Fourth configuration module; The fourth configuration module is used to format the preprocessed data and encrypt the data using a hybrid encryption method; Fifth configuration module; The fifth configuration module is used to encapsulate the encrypted data, the encrypted symmetric encryption key, and relevant metadata into a data packet and send it to the target SaaS system through an asynchronous transmission method; The SaaS system receives the data packet and parses out the encrypted data, the encrypted symmetric encryption key, and metadata; Decryption module; The decryption module uses the private key to decrypt the symmetric encryption key, and then uses this key to decrypt the data; Verification module; The verification module is used to perform integrity verification and business logic verification on the decrypted data; First encryption module; The first encryption module is used to process the data after verification passes, generate a response data packet, and encrypt and return it to the tenant management platform; Second encryption module; The second encryption module generates an initial key seed based on the tenant unique identifier, registration time, and business type, and derives an encryption key and a verification key; Third encryption module; The third encryption module is used to encrypt and store the key, update the key regularly or as needed, and distribute the key through a key exchange protocol based on ECC encryption; Fourth encryption module; The fourth encryption module switches the old and new keys in a step-by-step transition manner.

9. An electronic device, characterized in that, The device includes: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements the encrypted data transmission method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, At least one executable instruction is stored in the storage medium, and when the executable instruction runs on an electronic device, it causes the electronic device to execute the encrypted data transmission method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Bill data batch transmission dynamic encryption method and system

    CN121441528A