Data transmission method, device, readable storage medium and program product

By deploying encryption modules on the server and client, and dividing data transmission types according to the data importance level, the existing HTTPS data transmission methods are solved, and efficient and secure data transmission is achieved.

CN119402297BActive Publication Date: 2025-04-25INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411997548.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-25
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

The existing HTTPS data transmission methods have the risk that the source code is infiltrated or tampered with by malicious external attackers, and the replacement of software or components is large, with low security, high cost, and complex deployment and maintenance.

Method used

By deploying encryption modules on both the server and the client, it is divided into a data set to be transmitted and a data set to be transmitted in a ciphertext transmission and a data set to be transmitted in a plaintext transmission, and the encryption module is used to encrypt and transmit the data to be transmitted in a ciphertext transmission.

Benefits of technology

It improves system security, reduces deployment and maintenance complexity and cost, improves system resource utilization, and achieves reasonable and efficient encryption protection of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119402297B_ABST
    Figure CN119402297B_ABST
Patent Text Reader

Abstract

The present invention discloses a data transmission method, device, readable storage medium and program product, which relates to the field of data encryption technology, including: obtaining the data importance level corresponding to each data to be transmitted; dividing each data to be transmitted into a data set to be ciphertext transmission and a data set to be plaintext transmission according to the data importance level; using an encryption module to encrypt and transmit each data to be transmitted in the ciphertext transmission data set; wherein the encryption module is generated by the server, and the client obtains the encryption module from the server, so that both the server and the client contain the encryption module; and each data to be transmitted in the plaintext transmission data set is transmitted in plaintext. The data transmission method provided by the present invention improves system security, reduces deployment and maintenance complexity, reduces costs, and improves system resource utilization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data encryption technology, and in particular to a data transmission method, device, readable storage medium and program product. Background Art

[0002] The storage system provides network (World Wide Web, WEB) services and interface services to users through the Hypertext Transfer Protocol Secure (HTTPS). The current HTTPS basically uses traditional international standard encryption algorithms. Although international standard encryption algorithms are safe and reliable, they cannot guarantee the security of source code. Therefore, HTTPS based on international standard encryption algorithms has the risk of source code being infiltrated or tampered by external malicious attackers.

[0003] There are two main methods for implementing HTTPS based on national encryption. One is to replace all certificates, encryption suites, clients, servers, and dependent components with national encryption versions. This solution requires replacing more software or components, which requires a lot of work and may introduce potential risks to the original WEB services and interface functions. Currently, the commonly used national encryption clients and servers are charged, which increases the cost of replacement. The other is to use a free national encryption proxy service. This solution does not require the server to be replaced with a national encryption version, but a separate server device needs to be provided for deploying the national encryption proxy service. The deployment and implementation are complicated and add additional proxy service maintenance work.

[0004] In summary, how to effectively solve the problems of large workload, low security, high cost, and complex deployment and maintenance in replacing software or components in current data transmission methods is an urgent problem that technicians in this field need to solve. Summary of the invention

[0005] An object of the present invention is to provide a data transmission method, which improves system security, reduces deployment and maintenance complexity, reduces costs, and improves system resource utilization; another object of the present invention is to provide a data transmission device, a computer-readable storage medium, and a computer program product.

[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0007] A data transmission method, comprising:

[0008] Obtaining the data importance level corresponding to each piece of data to be transmitted;

[0009] According to the importance level of the data, each data to be transmitted is divided into a data set to be transmitted in ciphertext and a data set to be transmitted in plaintext;

[0010] Using an encryption module to encrypt and transmit each data to be transmitted in the ciphertext transmission data set; wherein the encryption module is generated by the server, and the client obtains the encryption module from the server, so that the server and the client both contain the encryption module;

[0011] Perform plaintext transmission on each data to be transmitted in the data set to be transmitted in plaintext.

[0012] In a specific implementation of the present invention, each data to be transmitted is divided into a data set to be transmitted as ciphertext and a data set to be transmitted as plaintext according to the importance level of the data, including:

[0013] Get the encryption computing performance value of the current system;

[0014] Calculate the encryption requirement index corresponding to each piece of data to be transmitted according to the data importance level and the encryption calculation performance value;

[0015] Get the current encryption requirement threshold;

[0016] According to the data importance level, the encryption requirement index and the current encryption requirement threshold, each data to be transmitted is divided into the data set to be transmitted in ciphertext and the data set to be transmitted in plaintext.

[0017] In a specific implementation of the present invention, after obtaining the data importance levels corresponding to the data to be transmitted, and before obtaining the encryption computing performance value of the current system, the method further includes:

[0018] When it is determined that encrypted transmission is necessary according to the importance level of the data, the data to be transmitted is divided into the data sets to be encrypted transmission;

[0019] Accordingly, the encryption requirement index corresponding to each piece of data to be transmitted is calculated according to the data importance level and the encryption computing performance value, including:

[0020] When it is determined that encrypted transmission is not necessary according to the importance level of the data, an encryption requirement index corresponding to the data to be transmitted is calculated according to the importance level of the data and the encryption calculation performance value;

[0021] Accordingly, each data to be transmitted is divided into the data set to be transmitted in ciphertext and the data set to be transmitted in plaintext according to the data importance level, the encryption requirement index and the current encryption requirement threshold, including:

[0022] According to the encryption requirement index and the current encryption requirement threshold, each data to be transmitted that does not necessarily require encryption transmission is divided into the data set to be ciphertext transmitted and the data set to be plaintext transmitted.

[0023] In a specific implementation of the present invention, the data to be transmitted that does not necessarily need to be encrypted are divided into the data set to be transmitted in ciphertext and the data set to be transmitted in plaintext according to the encryption requirement index and the current encryption requirement threshold, including:

[0024] When the encryption requirement index is greater than or equal to the current encryption requirement threshold, the to-be-transmitted data that does not necessarily require encrypted transmission is divided into the to-be-encrypted transmission data set;

[0025] When the encryption requirement index is less than the current encryption requirement threshold, the data to be transmitted that does not necessarily require encryption transmission is divided into the data set to be transmitted in plain text.

[0026] In a specific implementation of the present invention, calculating the encryption requirement index corresponding to the data to be transmitted according to the data importance level and the encryption calculation performance value includes:

[0027] Determine encryption priority based on data importance level;

[0028] Acquire the data volume of the data to be transmitted;

[0029] Obtain the preset encryption priority impact weight, encryption calculation performance value impact weight, data volume impact weight and encryption priority threshold;

[0030] Obtain the maximum encryption priority, maximum data volume and total encryption processing performance of the system;

[0031] According to the encryption priority, the maximum encryption priority value, the data volume, the maximum data volume, the encryption priority impact weight, the encryption computing performance value impact weight, the data volume impact weight, the encryption priority threshold, the encryption computing performance value and the system total encryption processing performance value, calculate the encryption requirement index corresponding to the data to be transmitted.

[0032] In a specific implementation of the present invention, obtaining the encryption computing performance value of the current system includes:

[0033] Get the amount of data that can be encrypted per unit time in the system;

[0034] Get current system load information;

[0035] The encryption computing performance value is determined according to the amount of encryptable data and the current system load information.

[0036] In a specific implementation of the present invention, obtaining the current encryption requirement threshold includes:

[0037] Get the preset basic encryption requirement threshold;

[0038] Obtain the preset system performance coefficient;

[0039] Calculating a system load impact factor according to the system performance coefficient, the amount of encryptable data and the current system load information;

[0040] Obtain the preset data distribution influence coefficient;

[0041] Calculate the total amount of data corresponding to each encryption priority level according to the data amount and encryption priority level corresponding to each data to be transmitted;

[0042] Calculate the data priority distribution impact factor according to the data distribution impact coefficient, the total amount of data corresponding to each encryption priority and each encryption priority;

[0043] The current encryption requirement threshold is calculated according to the basic encryption requirement threshold, the system load impact factor and the data priority distribution impact factor.

[0044] In a specific implementation of the present invention, using an encryption module to encrypt and transmit each data to be transmitted in the ciphertext transmission data set includes:

[0045] Get the encryption key calculated based on the timestamp and the hash value of the data packet;

[0046] The encryption module uses the encryption key to encrypt and transmit each data to be transmitted in the ciphertext transmission data set.

[0047] In a specific embodiment of the present invention, it also includes:

[0048] When it is determined that the encryption key needs to be updated, the encryption key is updated.

[0049] In a specific implementation of the present invention, when it is determined that the encryption key needs to be updated, updating the encryption key includes:

[0050] Obtaining the number of times the encryption key has been used and the length of idle time;

[0051] When it is determined that the encryption key needs to be updated according to the number of times used and the length of the idle time, the encryption key is updated.

[0052] In a specific implementation of the present invention, when it is determined that the encryption key needs to be updated according to the number of times used and the length of the idle time, the encryption key is updated, including:

[0053] Obtain the preset key usage count threshold, request idle time threshold, key update threshold, key usage count weight, and request idle time weight;

[0054] Calculate a key score according to the key usage count threshold, the requested idle time threshold, the key usage count weight, the requested idle time weight, the number of times used, and the idle time length;

[0055] When it is determined that the key score is greater than or equal to the key update threshold, the encryption key is updated.

[0056] In a specific implementation of the present invention, updating the encryption key includes:

[0057] Get the timestamp of the current time;

[0058] Get the hash value of the last encrypted data packet;

[0059] A new encryption key is generated according to the timestamp of the current time and the hash value of the last encrypted data packet.

[0060] A data transmission device, comprising:

[0061] Memory for storing computer programs;

[0062] A processor is used to implement the steps of the data transmission method as described above when executing the computer program.

[0063] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data transmission method described above are implemented.

[0064] A computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the data transmission method described above are implemented.

[0065] The data transmission method provided by the present invention obtains the data importance level corresponding to each data to be transmitted; divides each data to be transmitted into a data set to be ciphertext transmitted and a data set to be plaintext transmitted according to the data importance level; uses an encryption module to encrypt and transmit each data to be transmitted in the ciphertext transmitted data set; wherein the encryption module is generated by the server, and the client obtains the encryption module from the server, so that both the server and the client contain the encryption module; and transmits each data to be transmitted in the plaintext transmitted data set in plaintext.

[0066] The beneficial effect of the present invention is that, by deploying encryption modules on both the server and the client, it is only necessary to generate the encryption module on the server, and the client directly obtains the encryption module from the server. There is no need to replace software or components, which greatly reduces the workload, improves system security, reduces the complexity of deployment and maintenance, and reduces costs. In addition, according to the data importance level of each data to be transmitted, each data to be transmitted is divided into a data set to be transmitted in ciphertext and a data set to be transmitted in plaintext for transmission, and the data to be transmitted that needs to be transmitted in ciphertext form is encrypted and transmitted, and the data to be transmitted that does not need to be transmitted in ciphertext form is transmitted in plaintext, which realizes intelligent decision-making on whether to encrypt the data to be transmitted, thereby realizing reasonable and efficient encryption protection of the data and improving the utilization rate of system resources.

[0067] Correspondingly, the present invention also provides a data transmission device, a computer-readable storage medium and a computer program product corresponding to the above-mentioned data transmission method, which have the above-mentioned technical effects and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0069] Figure 1 is an implementation flow chart of a data transmission method in an embodiment of the present invention;

[0070] Figure 2 This is a structural block diagram of a data transmission system in an embodiment of the present invention;

[0071] Figure 3 is an implementation flow chart of another data transmission method in an embodiment of the present invention;

[0072] Figure 4 A schematic diagram of data flow in a process where a client sends a request in an embodiment of the present invention;

[0073] Figure 5 A schematic diagram of data flow in a process in which a server sends a response in an embodiment of the present invention;

[0074] Figure 6 This is a structural block diagram of a data transmission device in an embodiment of the present invention;

[0075] Figure 7 This is a structural block diagram of a data transmission device in an embodiment of the present invention;

[0076] Figure 8A schematic diagram of the specific structure of a data transmission device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0077] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0078] See also Figure 1 , Figure 1 This is a flow chart of an implementation method of a data transmission method in an embodiment of the present invention. The method may include the following steps:

[0079] S101: Obtaining data importance levels corresponding to each piece of data to be transmitted.

[0080] After each data to be transmitted is generated, the data importance level corresponding to each data to be transmitted is determined, for example, the data importance level corresponding to each data to be transmitted can be determined according to factors such as sensitivity, value, and impact scope of each data to be transmitted. The data importance level corresponding to each data to be transmitted is obtained.

[0081] The data to be transmitted may be request data that the client needs to send to the server, or may be response data that the server needs to send to the client.

[0082] S102: Divide the data to be transmitted into a data set to be encrypted and a data set to be plaintext according to the importance level of the data.

[0083] The higher the data importance level of each data to be transmitted, the higher the confidentiality of data transmission. For example, user names and passwords need to be transmitted in ciphertext. The lower the data importance level of each data to be transmitted, the lower the confidentiality of data transmission. For example, device parameters can be transmitted in plaintext. After obtaining the data importance level corresponding to each data to be transmitted, the data to be transmitted are divided into a data set to be transmitted in ciphertext and a data set to be transmitted in plaintext according to the data importance level.

[0084] S103: Using an encryption module to encrypt and transmit each data to be transmitted in the ciphertext transmission data set.

[0085] The encryption module is generated by the server, and the client obtains the encryption module from the server, so that both the server and the client contain the encryption module.

[0086] See also Figure 2 , Figure 2It is a structural block diagram of a data transmission system in an embodiment of the present invention. The server generates code files corresponding to the data encryption module, the data decryption module, and the key management module, and the client loads the code files corresponding to the data encryption module, the data decryption module, and the key management module from the server. The data encryption module on the server is responsible for performing national secret encryption processing on the response data before sending it, ensuring that sensitive information is fully protected during transmission. The data decryption module on the server is responsible for decrypting the encrypted data therein when receiving the client request data to restore the original data content. The data encryption module on the client is responsible for performing national secret encryption processing on the request data before sending it. The data decryption module on the client is responsible for decrypting the encrypted data therein when receiving the response data sent by the server. The key management module is responsible for real-time updating and management of encryption and decryption keys. By updating the keys regularly or according to specific security policies, the risk of the keys being cracked can be effectively reduced, thereby ensuring the continuous security of encrypted communications.

[0087] After the data set to be transmitted as ciphertext and the data set to be transmitted as plaintext are divided, the encryption module is used to encrypt and transmit each data to be transmitted in the data set to be transmitted as ciphertext, thereby realizing the encrypted transmission of the data to be transmitted with high confidentiality requirements.

[0088] By establishing an encryption and decryption mechanism based on the national secret algorithm between the client and the server, the mechanism is seamlessly embedded in the HTTPS request and response processing flow, ensuring that all transmitted key application data is encrypted by the national secret before leaving the client, and is immediately decrypted after being received by the server. This process not only enhances data security, but also maintains compatibility with non-national secret HTTPS protocols, reducing upgrade costs.

[0089] S104: Perform plain text transmission on each data to be transmitted in the plain text transmission data set.

[0090] After dividing the data set to be transmitted as ciphertext and the data set to be transmitted as plaintext, each data to be transmitted in the plaintext transmission data set is transmitted in plaintext, so that the data to be transmitted with low confidentiality requirements is transmitted in plaintext, avoiding unnecessary data encryption operations, achieving reasonable and efficient encryption protection of data, and improving system resource utilization.

[0091] It can be seen from the above technical solution that by deploying encryption modules on both the server and the client, it is only necessary to generate the encryption module on the server, and the client directly obtains the encryption module from the server. There is no need to replace software or components, which greatly reduces the workload, improves system security, reduces the complexity of deployment and maintenance, and reduces costs. In addition, according to the importance level of each data to be transmitted, each data to be transmitted is divided into a data set to be transmitted in ciphertext and a data set to be transmitted in plaintext for transmission. The data to be transmitted that needs to be transmitted in ciphertext form is encrypted and transmitted, and the data to be transmitted that does not need to be transmitted in ciphertext form is transmitted in plaintext, which realizes intelligent decision-making on whether to encrypt the data to be transmitted, thereby realizing reasonable and efficient encryption protection of the data and improving the utilization rate of system resources.

[0092] It should be noted that, based on the above embodiment, the embodiment of the present invention also provides corresponding improved solutions. In the subsequent embodiments, the same steps or corresponding steps as those in the above embodiment can be referenced to each other, and the corresponding beneficial effects can also be referenced to each other, which will not be repeated one by one in the following improved embodiments.

[0093] See also Figure 3 , Figure 3 This is a flowchart of another data transmission method in an embodiment of the present invention. The method may include the following steps:

[0094] S301: Obtaining data importance levels corresponding to each piece of data to be transmitted.

[0095] S302: Obtain the encryption computing performance value of the current system.

[0096] In addition to encryption processing tasks, there are some other loads in the system. The encryption processing capability of the system is limited. Obtain the encryption computing performance value of the current system.

[0097] S303: Calculate the encryption requirement index corresponding to each piece of data to be transmitted according to the data importance level and the encryption calculation performance value.

[0098] The encryption requirement of each data to be transmitted is related to the data importance level of each data to be transmitted and the encryption computing performance value of the current system. After obtaining the data importance level and the encryption computing performance value of each data to be transmitted, the encryption requirement index corresponding to each data to be transmitted is calculated according to the data importance level and the encryption computing performance value.

[0099] S304: Obtain the current encryption requirement threshold.

[0100] An encryption requirement threshold is preset, and after the encryption requirement indexes corresponding to the data to be transmitted are calculated, the current encryption requirement threshold is obtained.

[0101] S305: Divide each data to be transmitted into a data set to be transmitted in ciphertext and a data set to be transmitted in plaintext according to the data importance level, the encryption requirement index and the current encryption requirement threshold.

[0102] After obtaining the data importance level and current encryption requirement threshold corresponding to each data to be transmitted, and calculating the encryption requirement index corresponding to each data to be transmitted, each data to be transmitted is divided into a data set to be ciphertext transmitted and a data set to be plaintext transmitted according to the data importance level, encryption requirement index and current encryption requirement threshold. By calculating the encryption requirement index corresponding to each data to be transmitted according to the data importance level corresponding to each data to be transmitted and the current encryption computing performance value of the system, comparing each encryption requirement index with the current encryption requirement threshold, and dividing each data to be transmitted into a data set to be ciphertext transmitted and a data set to be plaintext transmitted according to the comparison result, the rationality and accuracy of the data set division are greatly improved.

[0103] S306: Obtain an encryption key calculated based on the timestamp and the data packet hash value.

[0104] The encryption key used to encrypt the data to be transmitted that needs to be encrypted is calculated in advance based on the timestamp and the data packet hash value. After each data to be transmitted is divided into a data set to be transmitted as ciphertext and a data set to be transmitted as plaintext, the encryption key calculated based on the timestamp and the data packet hash value is obtained. By using the encryption key calculated based on the timestamp and the data packet hash value, the encryption key is quickly and effectively updated, which effectively improves the complexity and security of the key.

[0105] S307: Encrypt and transmit each data to be transmitted in the ciphertext transmission data set by using an encryption module and an encryption key.

[0106] The encryption module is generated by the server, and the client obtains the encryption module from the server, so that both the server and the client contain the encryption module.

[0107] S308: Perform plain text transmission on each data to be transmitted in the plain text transmission data set.

[0108] The encryption module is deployed on both the server and the client. It is only necessary to generate the code file that constitutes the encryption module on the server. The client can directly load the code file from the server to obtain the encryption module. Without subverting the existing non-national secret HTTPS architecture and without replacing the WEB service dependent components and clients, it is easy to deploy and implement the national secret encryption of key application data during HTTPS transmission, adding a layer of national secret level security protection to key application data, thereby significantly improving the security of WEB services, significantly improving the overall security, integrity and authenticity of data transmission, and effectively resisting various network attacks and data leakage risks. It can improve the compatibility and stability of the system while reducing the implementation and maintenance costs of the enterprise.

[0109] In a specific implementation of the present invention, after obtaining the data importance levels corresponding to the data to be transmitted, and before obtaining the encryption computing performance value of the current system, the method may further include the following steps:

[0110] When it is determined that encrypted transmission is necessary according to the importance level of the data, the data to be transmitted is divided into a data set to be encrypted transmission;

[0111] Accordingly, step S303 may include the following steps:

[0112] When it is determined that encrypted transmission is not necessary according to the importance level of the data, the encryption requirement index corresponding to the data to be transmitted is calculated according to the importance level of the data and the encryption calculation performance value;

[0113] Accordingly, step S305 may include the following steps:

[0114] According to the encryption requirement index and the current encryption requirement threshold, each data to be transmitted that does not necessarily need to be encrypted is divided into a data set to be transmitted in ciphertext and a data set to be transmitted in plaintext.

[0115] For the convenience of description, the above steps can be combined for explanation.

[0116] After obtaining the data importance level corresponding to each data to be transmitted, and before obtaining the encryption calculation performance value of the current system, when it is determined that encrypted transmission is required according to the data importance level, it means that the confidentiality requirement of the data to be transmitted is high, and the data to be transmitted is directly divided into the data set to be ciphertext transmission. When it is determined that encrypted transmission is not required according to the data importance level, the encryption requirement index corresponding to the data to be transmitted is calculated according to the data importance level and the encryption calculation performance value, and the data to be transmitted that is not required to be encrypted is divided into the data set to be ciphertext transmission and the data set to be plaintext transmission according to the encryption requirement index and the current encryption requirement threshold. By directly dividing the data to be transmitted that must be encrypted into the data set to be ciphertext transmission, some unnecessary encryption requirement index calculation processes are avoided, the workload of encryption requirement index calculation is reduced, and the efficiency of dividing the data set to be ciphertext transmission and the data set to be plaintext transmission is improved.

[0117] In a specific implementation of the present invention, dividing each data to be transmitted that does not necessarily need to be encrypted into a data set to be transmitted in ciphertext and a data set to be transmitted in plaintext according to the encryption requirement index and the current encryption requirement threshold may include the following steps:

[0118] Step 1: When the encryption requirement index is greater than or equal to the current encryption requirement threshold, the data to be transmitted that does not need to be encrypted is divided into the data set to be encrypted;

[0119] Step 2: When the encryption requirement index is less than the current encryption requirement threshold, the data to be transmitted that does not need to be encrypted is divided into the data set to be transmitted in plain text.

[0120] For the convenience of description, the above two steps can be combined for explanation.

[0121] After obtaining the current encryption requirement threshold and the encryption requirement index corresponding to each data to be transmitted that does not require encryption, each encryption requirement index is compared with the current encryption requirement threshold. When the encryption requirement index is greater than or equal to the current encryption requirement threshold, the data to be transmitted that does not require encryption is divided into the data set to be transmitted in ciphertext. When the encryption requirement index is less than the current encryption requirement threshold, the data to be transmitted that does not require encryption is divided into the data set to be transmitted in plaintext. By comparing the encryption requirement index corresponding to each data to be transmitted that does not require encryption with the current encryption requirement threshold, the data to be transmitted that does not require encryption is quickly and accurately divided into the data set to be transmitted in ciphertext and the data set to be transmitted in plaintext.

[0122] In a specific implementation of the present invention, calculating the encryption requirement index corresponding to the data to be transmitted according to the data importance level and the encryption calculation performance value may include the following steps:

[0123] Step 1: Determine encryption priority based on data importance level;

[0124] Step 2: Obtain the amount of data to be transmitted;

[0125] Step 3: Obtain the preset encryption priority impact weight, encryption calculation performance value impact weight, data volume impact weight and encryption priority threshold;

[0126] Step 4: Obtain the maximum encryption priority, the maximum data volume, and the total encryption processing performance value of the system;

[0127] Step 5: Calculate the encryption requirement index corresponding to the data to be transmitted based on the encryption priority, maximum encryption priority, data volume, maximum data volume, encryption priority impact weight, encryption calculation performance value impact weight, data volume impact weight, encryption priority threshold, encryption calculation performance value and system total encryption processing performance value.

[0128] For the convenience of description, the above five steps can be combined for explanation.

[0129] After obtaining the data importance level of each data to be transmitted that does not necessarily require encryption and the encryption computing performance value of the current system, the encryption priority is determined according to the data importance level. For example, the association between the data importance level and the encryption priority can be set in advance. After obtaining the encryption priority of each data to be transmitted that does not necessarily require encryption, the encryption priority of each data to be transmitted that does not necessarily require encryption is determined according to the association between the data importance level and the encryption priority.

[0130] The data volume of each data to be transmitted that does not necessarily require encryption transmission is obtained, the preset encryption priority impact weight, encryption calculation performance value impact weight, data volume impact weight and encryption priority threshold are obtained, and the maximum encryption priority value, the maximum data volume and the total encryption processing performance value of the system are obtained. According to the encryption priority, the maximum encryption priority value, the data volume, the maximum data volume, the encryption priority impact weight, the encryption calculation performance value impact weight, the data volume impact weight, the encryption priority threshold, the encryption calculation performance value and the total encryption processing performance value of the system, the encryption demand index corresponding to the data to be transmitted is calculated. Thus, the encryption demand index corresponding to each data to be transmitted that does not necessarily require encryption transmission is accurately calculated.

[0131] The encryption demand index can be calculated by the following formula:

[0132] ;

[0133] in, Influence weights for encryption priority, The weights that influence the performance value of encryption calculations, The amount of data affects the weight. is the maximum encryption priority value, is the maximum data volume, P is the encryption priority threshold, is the encryption priority, is the encryption computing performance value, C is the total encryption processing performance value of the system, The amount of data.

[0134] In a specific implementation of the present invention, step S302 may include the following steps:

[0135] Step 1: Obtain the amount of data that can be encrypted per unit time in the system;

[0136] Step 2: Get the current system load information;

[0137] Step 3: Determine the encryption computing performance value based on the amount of data that can be encrypted and the current system load information.

[0138] For the convenience of description, the above three steps can be combined for explanation.

[0139] When calculating the current encryption computing performance value of the system, the amount of data that can be encrypted per unit time of the system is obtained, the current system load information is obtained, and the encryption computing performance value is determined based on the amount of data that can be encrypted and the current system load information. By considering the current load of the system, the remaining available encryption processing capacity is calculated, which is the encryption computing performance value, which greatly improves the accuracy of the obtained encryption computing performance value.

[0140] In a specific implementation of the present invention, step S304 may include the following steps:

[0141] Step 1: Obtain the preset basic encryption requirement threshold;

[0142] Step 2: Obtain the preset system performance coefficient;

[0143] Step 3: Calculate the system load impact factor based on the system performance coefficient, the amount of data that can be encrypted, and the current system load information;

[0144] Step 4: Obtain the preset data distribution influence coefficient;

[0145] Step 5: Calculate the total amount of data corresponding to each encryption priority level according to the amount of data to be transmitted and the encryption priority level;

[0146] Step 6: Calculate the data priority distribution impact factor according to the data distribution impact coefficient, the total amount of data corresponding to each encryption priority, and each encryption priority;

[0147] Step 7: Calculate the current encryption requirement threshold based on the basic encryption requirement threshold, system load impact factor, and data priority distribution impact factor.

[0148] For the convenience of description, the above seven steps can be combined for explanation.

[0149] The encryption requirement threshold can be adjusted dynamically based on the system load and data priority distribution. Get the preset basic encryption requirement threshold. You can set the basic encryption requirement threshold to , obtain the preset system performance coefficient, and calculate the system load impact factor according to the system performance coefficient, the amount of data that can be encrypted, and the current system load information. For example, the system load impact factor can be calculated according to the following formula :

[0150] ;

[0151] in, It is a system performance coefficient and is set according to the hardware configuration of the system.

[0152] Obtain the preset data distribution influence coefficient, calculate the total amount of data corresponding to each encryption priority according to the data amount and encryption priority corresponding to each data to be transmitted, and calculate the data priority distribution influence factor according to the data distribution influence coefficient, the total amount of data corresponding to each encryption priority and each encryption priority. For example, the data priority distribution influence factor can be calculated according to the following formula :

[0153] ;

[0154] in, is the total amount of data corresponding to encryption priority i, It is a data distribution influence coefficient, which is determined according to the specifications of each object in the system. is the i-th encryption priority.

[0155] After the system load impact factor and the data priority distribution impact factor are calculated, the current encryption requirement threshold is calculated according to the basic encryption requirement threshold, the system load impact factor and the data priority distribution impact factor. For example, the current encryption requirement threshold T can be calculated according to the following formula:

[0156] ;

[0157] By dynamically calculating the encryption requirement threshold according to the system load and data priority distribution, the rationality of the encryption requirement threshold setting is greatly improved, thereby improving the accuracy of the division of the data set to be transmitted in ciphertext and the data set to be transmitted in plaintext.

[0158] In a specific embodiment of the present invention, the method may further include the following steps:

[0159] When it is determined that the encryption key needs to be updated, the encryption key is updated.

[0160] The key update process is set in advance. When it is determined that the encryption key needs to be updated, the encryption key is updated, thereby ensuring the timeliness and security of the key, effectively preventing the risk of the key being cracked due to long-term use, and ensuring the overall robustness of the encryption system.

[0161] In a specific implementation of the present invention, when it is determined that the encryption key needs to be updated, updating the encryption key may include the following steps:

[0162] Step 1: Obtain the number of times the encryption key has been used and the length of idle time;

[0163] Step 2: When it is determined that the encryption key needs to be updated based on the number of times it has been used and the length of idle time, the encryption key is updated.

[0164] For the convenience of description, the above two steps can be combined for explanation.

[0165] Obtain the number of times the encryption key has been used and the length of idle time. When it is determined that the encryption key needs to be updated based on the number of times it has been used and the length of idle time, update the encryption key. By introducing a key update mechanism based on the number of times the key has been used and the length of idle time, when the number of times the key has been used reaches the preset threshold or the length of idle time exceeds a certain range, the system will automatically trigger the key update process, thereby ensuring the timeliness and security of the key.

[0166] In a specific implementation of the present invention, when it is determined that the encryption key needs to be updated according to the number of times it has been used and the length of the idle time, updating the encryption key may include the following steps:

[0167] Step 1: Obtain the preset key usage count threshold, request idle time threshold, key update threshold, key usage count weight, and request idle time weight;

[0168] Step 2: Calculate the key score based on the key usage count threshold, request idle time threshold, key usage count weight, request idle time weight, usage count and idle time length;

[0169] Step 3: When it is determined that the key score is greater than or equal to the key update threshold, the encryption key is updated.

[0170] For the convenience of description, the above three steps can be combined for explanation.

[0171] Obtain the preset key usage count threshold, requested idle time threshold, key update threshold, key usage count weight and requested idle time weight, and calculate the key score based on the key usage count threshold, requested idle time threshold, key usage count weight, requested idle time weight, number of uses and idle time length. When it is determined that the key score is greater than or equal to the key update threshold, update the encryption key.

[0172] The key score can be calculated by the following formula :

[0173] ;

[0174] Among them, α is the weight of the number of times the key is used, and β is the weight of the request idle time, which is used to adjust the relative importance of the number of times the key has been used and the length of the idle time in the decision-making, and can be adjusted according to specific security policies and system requirements. is the number of times the key has been used; is the length of time the key has been idle since the last request, is the key usage count threshold, Request idle time threshold.

[0175] By calculating the key score and comparing the key score with the key update threshold, it is determined whether to update the encryption key, which avoids unnecessary updates to the encryption key and ensures the security of the encryption key.

[0176] In a specific implementation of the present invention, updating the encryption key may include the following steps:

[0177] Step 1: Get the timestamp of the current time;

[0178] Step 2: Get the hash value of the last encrypted data packet;

[0179] Step 3: Generate a new encryption key based on the timestamp of the current time and the hash value of the last encrypted data packet.

[0180] For the convenience of description, the above three steps can be combined for explanation.

[0181] The national secret SM3 algorithm can be used to calculate the data packet hash value, the initial data packet generates a timestamp conversion string, the timestamp and hash value concatenation string, and the national secret SM3 algorithm is used again to calculate the hash value as the encryption key. Get the timestamp of the current time, get the hash value of the last encrypted data packet, and generate a new encryption key based on the timestamp of the current time and the hash value of the last encrypted data packet. By generating a unique and random encryption key based on the timestamp of the current time and the hash value of the last encrypted data packet, the encryption key can be quickly and effectively updated, effectively improving the complexity and security of the key.

[0182] Get the current time stamp, including:

[0183] Use the server to obtain the timestamp of the current time and send the timestamp of the current time to the client;

[0184] Accordingly, the hash value of the last encrypted data packet is obtained, including:

[0185] Use the server and client to obtain the hash value of the last encrypted data packet respectively;

[0186] Accordingly, a new encryption key is generated based on the timestamp of the current time and the hash value of the last encrypted data packet, including:

[0187] The server and client generate a new encryption key based on the timestamp of the current time and the hash value of the last encrypted data packet.

[0188] When the encryption key is updated, the server obtains the timestamp of the current time and sends the timestamp of the current time to the client. The server and the client obtain the hash value of the last encrypted data packet respectively. The server and the client generate a new encryption key according to the timestamp of the current time and the hash value of the last encrypted data packet respectively. By setting the server to decide the update time of the key and sending the unified timestamp of the current time to the client, the client and the server use the same timestamp to generate the key, ensuring the consistency of the server and the client in updating the key.

[0189] See also Figure 4 , Figure 4 This is a schematic diagram of the data flow of a client sending a request in an embodiment of the present invention. Figure 5 , Figure 5The data flow diagram of a response process sent by a server in an embodiment of the present invention is shown in FIG. As a submodule of the key management module, the key generation module is responsible for generating the encryption keys required by the client and the server, and managing the relevant parameters for generating the keys. These keys will be used in the subsequent data encryption and decryption process to ensure the security of the transmitted data. The key monitoring module also belongs to the key management module, which is responsible for monitoring the number of times the key has been used and the length of idle time. According to the preset security policy, when the number of times the key has been used reaches a threshold or the length of idle time exceeds a certain length of time, the module will trigger the key update mechanism to reduce the risk of the key being cracked. As a core component of the key management module, the key storage module is responsible for storing the encryption keys currently in use and related information (such as the number of times used, the last time of use, etc.). In addition, the key storage module also stores the hash value information of the most recent encrypted data packet in history for updating the encryption key.

[0190] The encryption monitoring module is responsible for monitoring the encryption performance of the system, including key indicators such as encryption speed and resource consumption. By collecting and analyzing these data in real time, the encryption monitoring module can provide decision-making basis for the encryption decision module to ensure the efficiency and stability of the encryption process. As an important part of the data encryption module, the encryption decision module decides whether to encrypt the data based on the encryption level of the data to be encrypted and the encryption computing performance value of the current system. This decision-making process ensures the flexibility and adaptability of the encryption strategy, which can be dynamically adjusted according to actual needs.

[0191] The encryption execution module is a submodule of the data encryption module, and encrypts the data to be encrypted according to the current encryption key. The data decryption module corresponds to the encryption execution module, and is responsible for decrypting the encrypted data according to the current encryption key. By accurately matching the key with the encrypted data, the data decryption module can restore the original data content and ensure the availability of the data. In order to maintain the consistency of the key update timing, the server monitors the key usage data uniformly and decides whether to update the key. Therefore, the key management module of the client does not include the key monitoring module, and the data encryption module of the client does not include the encryption monitoring module.

[0192] Corresponding to the above method embodiment, the present invention further provides a data transmission device. The data transmission device described below and the data transmission method described above can be referenced to each other.

[0193] See also Figure 6 , Figure 6 This is a structural block diagram of a data transmission device in an embodiment of the present invention, and the device may include:

[0194] The data importance level acquisition unit 61 is used to acquire the data importance level corresponding to each data to be transmitted;

[0195] The data set division unit 62 is used to divide each data to be transmitted into a data set to be transmitted as ciphertext and a data set to be transmitted as plaintext according to the importance level of the data;

[0196] The encryption transmission unit 63 is used to encrypt and transmit each data to be transmitted in the ciphertext transmission data set by using the encryption module; wherein the encryption module is generated by the server, and the client obtains the encryption module from the server, so that both the server and the client include the encryption module;

[0197] The plaintext transmission unit 64 is used to perform plaintext transmission on each data to be transmitted in the plaintext transmission data set.

[0198] It can be seen from the above technical solution that by deploying encryption modules on both the server and the client, it is only necessary to generate the encryption module on the server, and the client directly obtains the encryption module from the server. There is no need to replace software or components, which greatly reduces the workload, improves system security, reduces the complexity of deployment and maintenance, and reduces costs. In addition, according to the data importance level of each data to be transmitted, each data to be transmitted is divided into a data set to be transmitted in ciphertext and a data set to be transmitted in plaintext for transmission. The data to be transmitted that needs to be transmitted in ciphertext form is encrypted and transmitted, and the data to be transmitted that does not need to be transmitted in ciphertext form is transmitted in plaintext, which realizes intelligent decision-making on whether to encrypt the data to be transmitted, thereby realizing reasonable and efficient encryption protection of the data and improving the utilization rate of system resources.

[0199] In a specific implementation of the present invention, the data set partitioning unit 62 includes:

[0200] The encryption computing performance value acquisition subunit is used to obtain the encryption computing performance value of the current system;

[0201] The encryption requirement index calculation subunit is used to calculate the encryption requirement index corresponding to each data to be transmitted according to the data importance level and the encryption calculation performance value;

[0202] A current encryption requirement threshold acquisition subunit is used to acquire the current encryption requirement threshold;

[0203] The data set division subunit is used to divide each data to be transmitted into a data set to be transmitted in ciphertext and a data set to be transmitted in plaintext according to the data importance level, encryption requirement index and current encryption requirement threshold.

[0204] In a specific embodiment of the present invention, the device may further include:

[0205] The data set division unit for ciphertext transmission is used to divide the data to be transmitted into the data set to be ciphertext transmission after obtaining the data importance level corresponding to each data to be transmitted and before obtaining the encryption calculation performance value of the current system, when it is determined that encrypted transmission is necessary according to the data importance level, to divide the data to be transmitted into the data set to be ciphertext transmission;

[0206] The encryption requirement index calculation subunit is specifically used to calculate the encryption requirement index corresponding to the data to be transmitted according to the data importance level and the encryption calculation performance value when it is determined that encryption transmission is not necessary according to the data importance level;

[0207] The data set division subunit is specifically used to divide each data to be transmitted that does not necessarily need to be encrypted into a data set to be transmitted in ciphertext and a data set to be transmitted in plaintext according to the encryption requirement index and the current encryption requirement threshold.

[0208] In a specific embodiment of the present invention, the data set division subunit is specifically used to divide the data to be transmitted that does not necessarily need to be encrypted into the data set to be transmitted in ciphertext when the encryption requirement index is greater than or equal to the current encryption requirement threshold; when the encryption requirement index is less than the current encryption requirement threshold, divide the data to be transmitted that does not necessarily need to be encrypted into the data set to be transmitted in plaintext.

[0209] In a specific embodiment of the present invention, the encryption requirement index calculation subunit is specifically used to determine the encryption priority according to the data importance level; obtain the data volume of the data to be transmitted; obtain the preset encryption priority influence weight, encryption computing performance value influence weight, data volume influence weight and encryption priority threshold; obtain the maximum encryption priority value, the maximum data volume and the total encryption processing performance value of the system; calculate the encryption requirement index corresponding to the data to be transmitted according to the encryption priority, the maximum encryption priority value, the data volume, the maximum data volume, the encryption priority influence weight, the encryption computing performance value influence weight, the data volume influence weight, the encryption priority threshold, the encryption computing performance value and the total encryption processing performance value of the system.

[0210] In a specific embodiment of the present invention, the encryption computing performance value acquisition subunit is specifically used to obtain the amount of encryptable data in the system per unit time; obtain the current system load information; and determine the encryption computing performance value based on the amount of encryptable data and the current system load information.

[0211] In a specific embodiment of the present invention, the current encryption requirement threshold acquisition subunit is specifically used to obtain a preset basic encryption requirement threshold; obtain a preset system performance coefficient; calculate the system load impact factor based on the system performance coefficient, the amount of encryptable data and the current system load information; obtain a preset data distribution impact coefficient; calculate the total amount of data corresponding to each encryption priority level based on the data amount and encryption priority corresponding to each data to be transmitted; calculate the data priority distribution impact factor based on the data distribution impact coefficient, the total amount of data corresponding to each encryption priority level and each encryption priority level; calculate the current encryption requirement threshold based on the basic encryption requirement threshold, the system load impact factor and the data priority distribution impact factor.

[0212] In a specific implementation of the present invention, the encryption transmission unit 63 is specifically used to obtain an encryption key calculated based on the timestamp and the data packet hash value; and encrypt and transmit each data to be transmitted in the ciphertext transmission data set using the encryption key through the encryption module.

[0213] In a specific embodiment of the present invention, the device may further include:

[0214] The key updating unit is used to update the encryption key when it is determined that the encryption key needs to be updated.

[0215] In a specific implementation of the present invention, the key updating unit includes:

[0216] A subunit for obtaining the number of times used and the length of idle time, used to obtain the number of times the encryption key has been used and the length of idle time;

[0217] The key updating subunit is used to update the encryption key when it is determined that the encryption key needs to be updated according to the number of times it has been used and the length of the idle time.

[0218] In a specific embodiment of the present invention, the key update subunit is specifically used to obtain a preset key usage count threshold, a requested idle time threshold, a key update threshold, a key usage count weight, and a requested idle time weight; calculate a key score based on the key usage count threshold, the requested idle time threshold, the key usage count weight, the requested idle time weight, the number of uses, and the idle time length; when it is determined that the key score is greater than or equal to the key update threshold, the encryption key is updated.

[0219] In a specific implementation of the present invention, the key updating unit includes:

[0220] A timestamp acquisition subunit is used to obtain the timestamp of the current time;

[0221] A hash value acquisition subunit is used to acquire the hash value of the last encrypted data packet;

[0222] The encryption key generation subunit is used to generate a new encryption key according to the timestamp of the current time and the hash value of the last encrypted data packet.

[0223] Corresponding to the above method embodiment, see Figure 7 , Figure 7 This is a schematic diagram of a data transmission device provided by the present invention, and the device may include:

[0224] A memory 332, for storing computer programs;

[0225] The processor 322 is configured to implement the steps of the data transmission method in the above method embodiment when executing a computer program.

[0226] For details, please refer to Figure 8 , Figure 8 A specific structural diagram of a data transmission device provided for this embodiment, the data transmission device may have relatively large differences due to different configurations or performances, and may include a processor (central processing units, CPU) 322 (for example, one or more processors) and a memory 332, and the memory 332 stores one or more computer programs 342 or data 344. Among them, the memory 332 can be a temporary storage or a permanent storage. The program stored in the memory 332 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the data processing device. Furthermore, the processor 322 can be configured to communicate with the memory 332 to execute a series of instruction operations in the memory 332 on the data transmission device 301.

[0227] The data transmission device 301 may further include one or more power supplies 326 , one or more wired or wireless network interfaces 350 , one or more input and output interfaces 358 , and / or one or more operating systems 341 .

[0228] The steps in the data transmission method described above can be implemented by the structure of a data transmission device.

[0229] Corresponding to the above method embodiment, the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following steps can be implemented:

[0230] Obtain the data importance level corresponding to each data to be transmitted; divide each data to be transmitted into a data set to be ciphertext transmitted and a data set to be plaintext transmitted according to the data importance level; use the encryption module to encrypt and transmit each data to be transmitted in the ciphertext transmitted data set; wherein the encryption module is generated by the server, and the client obtains the encryption module from the server, so that both the server and the client contain the encryption module; and transmit each data to be transmitted in the plaintext transmitted data set in plaintext.

[0231] The computer-readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0232] For an introduction to the computer-readable storage medium provided by the present invention, please refer to the above method embodiment, and the present invention will not be elaborated here.

[0233] Corresponding to the above method embodiments, the present invention further provides a computer program product, including a computer program, which implements the steps of the above data transmission method when executed by a processor.

[0234] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device, computer-readable storage medium, and computer program product disclosed in the embodiment, since they correspond to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0235] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the technical solution and core ideas of the present invention. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, the present invention can also be improved and modified, and these improvements and modifications also fall within the scope of protection of the present invention.

Claims

1. A data transmission method, characterized in that: include: Obtaining the data importance level corresponding to each piece of data to be transmitted; Get the amount of data that can be encrypted per unit time in the system; Get current system load information; Determine the encryption computing performance value according to the encryptable data amount and the current system load information; When it is determined that encrypted transmission is not necessary according to the importance level of the data, the encryption priority is determined according to the importance level of the data; Obtaining the amount of data to be transmitted; Obtain the preset encryption priority impact weight, encryption calculation performance value impact weight, data volume impact weight and encryption priority threshold; Obtain the maximum encryption priority, maximum data volume and total encryption processing performance of the system; Calculate the encryption requirement index corresponding to the data to be transmitted according to the encryption priority, the maximum encryption priority, the data volume, the maximum data volume, the encryption priority impact weight, the encryption calculation performance value impact weight, the data volume impact weight, the encryption priority threshold, the encryption calculation performance value and the system total encryption processing performance value; Get the current encryption requirement threshold; Dividing each data to be transmitted that does not necessarily need to be encrypted into a data set to be transmitted in ciphertext and a data set to be transmitted in plaintext according to the encryption requirement index and the current encryption requirement threshold; Using an encryption module to encrypt and transmit each data to be transmitted in the ciphertext transmission data set; wherein the encryption module is generated by the server, and the client obtains the encryption module from the server, so that both the server and the client contain the encryption module; Perform plaintext transmission on each data to be transmitted in the data set to be transmitted in plaintext.

2. The data transmission method according to claim 1, characterized in that: After obtaining the data importance levels corresponding to the data to be transmitted, and before obtaining the amount of data that can be encrypted per unit time of the system, the following steps are also included: When it is determined that encrypted transmission is necessary according to the importance level of the data, the data to be transmitted is divided into the data set to be encrypted transmission.

3. The data transmission method according to claim 1, characterized in that: According to the encryption requirement index and the current encryption requirement threshold, each to-be-transmitted data that does not necessarily need to be encrypted is divided into the to-be-encrypted transmission data set and the to-be-plaintext transmission data set, including: When the encryption requirement index is greater than or equal to the current encryption requirement threshold, the to-be-transmitted data that does not necessarily require encrypted transmission is divided into the to-be-encrypted transmission data set; When the encryption requirement index is less than the current encryption requirement threshold, the data to be transmitted that does not necessarily require encryption transmission is divided into the data set to be transmitted in plain text.

4. The data transmission method according to any one of claims 1 to 3, characterized in that: Get the current encryption requirement threshold, including: Get the preset basic encryption requirement threshold; Obtain the preset system performance coefficient; Calculating a system load impact factor according to the system performance coefficient, the amount of encryptable data and the current system load information; Obtain the preset data distribution influence coefficient; Calculate the total amount of data corresponding to each encryption priority level according to the data amount and encryption priority level corresponding to each data to be transmitted; Calculate the data priority distribution impact factor according to the data distribution impact coefficient, the total amount of data corresponding to each encryption priority and each encryption priority; The current encryption requirement threshold is calculated according to the basic encryption requirement threshold, the system load impact factor and the data priority distribution impact factor.

5. The data transmission method according to claim 1, characterized in that: The encryption module is used to encrypt and transmit each data to be transmitted in the ciphertext transmission data set, including: Get the encryption key calculated based on the timestamp and the data packet hash value; The encryption module uses the encryption key to encrypt and transmit each data to be transmitted in the ciphertext transmission data set.

6. The data transmission method according to claim 5, characterized in that: Also includes: When it is determined that the encryption key needs to be updated, the encryption key is updated.

7. The data transmission method according to claim 6, characterized in that: When it is determined that the encryption key needs to be updated, updating the encryption key includes: Obtaining the number of times the encryption key has been used and the length of idle time; When it is determined that the encryption key needs to be updated according to the number of times used and the length of the idle time, the encryption key is updated.

8. The data transmission method according to claim 7, characterized in that: When it is determined that the encryption key needs to be updated according to the number of times the encryption key has been used and the length of the idle time, the encryption key is updated, including: Obtain the preset key usage count threshold, request idle time threshold, key update threshold, key usage count weight, and request idle time weight; Calculate a key score according to the key usage count threshold, the requested idle time threshold, the key usage count weight, the requested idle time weight, the number of times used, and the idle time length; When it is determined that the key score is greater than or equal to the key update threshold, the encryption key is updated.

9. The data transmission method according to claim 7, characterized in that: Updating the encryption key includes: Get the timestamp of the current time; Get the hash value of the last encrypted data packet; A new encryption key is generated according to the timestamp of the current time and the hash value of the last encrypted data packet.

10. A data transmission device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the data transmission method according to any one of claims 1 to 9 when executing the computer program.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data transmission method according to any one of claims 1 to 9 are implemented.

12. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the data transmission method according to any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Method, device and system for encrypting terminal communication based on active network technology

    CN101588237A

  • Information security protection method and device based on data transmission

    CN116389138A

  • Spatial positioning data encryption transmission method for asset management

    CN118802336A