A method, device and medium for encrypted data transmission based on active communication connection
By calculating the correlation degree value and weight of the characteristics of the lower computer equipment, and dynamically determining the communication connection method and encryption method, the problem of insufficient data transmission security in the prior art is solved, and more efficient data encryption and transmission security is achieved.
Patent Information
- Application Number
- CN202510162954.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2045-02-14
AI Technical Summary
In the prior art, when the lower computer transmits data to the cloud, it is difficult to dynamically adjust the encryption method according to the specific device characteristics, resulting in insufficient data transmission security.
By obtaining the device information and historical data list of the lower computer, calculating the correlation degree value of the device characteristics, obtaining the weight of each preset device characteristics, training the neural network model to determine the communication connection method, and selecting a suitable encryption method based on this method to encrypt and transmit the data.
Dynamically adjusting the encryption method improves the security of data transmission based on the characteristics of the lower computer equipment and ensures the integrity and privacy of data during the transmission process.
Smart Images

Figure CN119628975B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication encryption technology, and in particular to an encrypted data transmission method, device and medium based on active communication connection. Background Art
[0002] The cloud is a data aggregation center and processing hub. It receives and stores data from many lower computers. The lower computers are closely connected to physical devices and are responsible for collecting various raw data. For example, in industrial production scenarios, they can collect operating parameters of machine equipment, such as motor speed, temperature, vibration frequency, etc. In environmental monitoring, they collect meteorological data. According to preset rules or protocols, the lower computers upload the collected data to the cloud for data analysis or storage.
[0003] When the lower computer transmits data to the cloud, it usually uses encrypted transmission to protect data privacy, prevent data tampering, and ensure secure data transmission. Common encryption methods include symmetric encryption algorithms, such as the Advanced Encryption Standard (AES), asymmetric encryption algorithms, hybrid encryption methods, etc. Using encryption algorithms to increase data security has been explored. Summary of the invention
[0004] In view of the above technical problems, the technical solution adopted by the present invention is: an encrypted data transmission method based on active communication connection, which is applied to the lower computer to actively transmit data to the cloud, and the method includes:
[0005] Acquire a historical data list set, the historical data list set including a plurality of historical data lists and a communication connection mode corresponding to each historical data list, the historical data list including characteristic values of a plurality of preset device characteristics corresponding to a historical device;
[0006] Get the correlation value r of any two preset device features ab =[∑ n i=1 [(x ai -x a0 )×(y bi -y b0 )]] / [∑ n i=1 [(x ai -x a0 ) 2 ]×[∑ n i=1 (y bi -y b0 ) 2 ]] 1 / 2 , x ai is the ith eigenvalue of the ath first device feature, x a0is the mean of the n eigenvalues of the a-th first device feature, y bi is the ith eigenvalue of the bth second device feature, y b0 is the average of n feature values of the b-th second device feature, i ranges from 1 to n, n is the number of historical data lists, wherein the first device feature and the second device feature are both preset device features, and the first device feature is different from the second device feature;
[0007] Based on the correlation value r ab , obtain the weight of each preset device feature;
[0008] Multiply the feature value in the historical data list by the weight of the corresponding preset device feature to obtain an intermediate value, thereby obtaining an intermediate value list;
[0009] The neural network model is trained using the intermediate value list and the communication connection method corresponding to the intermediate value list to obtain the target neural network model;
[0010] Obtain the device information and data to be transmitted of the lower computer, and input the device feature information into the target neural network model to obtain the communication connection mode of the lower computer, wherein the device information includes the device ID, the account information stored in the device, and the device feature information; the device feature information is the feature value of the preset device feature of the lower computer; wherein the communication connection mode is a forward connection between the lower computer and the cloud or a reverse connection between the lower computer and the cloud;
[0011] Based on the communication connection mode of the lower computer, encrypt the data to be transmitted using the corresponding preset encryption mode, obtain the encrypted data, and generate the target key based on the corresponding preset encryption mode;
[0012] Based on the communication connection method of the lower computer, the encrypted data and target key are transmitted to the cloud.
[0013] According to another aspect of the present invention, a non-transitory computer-readable storage medium is provided, in which at least one instruction or at least one program is stored, and the at least one instruction or the at least one program is loaded and executed by a processor to implement the aforementioned method.
[0014] According to yet another aspect of the present invention, an electronic device is provided, comprising a processor and the aforementioned non-transitory computer-readable storage medium.
[0015] The present invention has at least the following beneficial effects: obtaining device information of a lower computer and data to be transmitted, inputting device feature information into a target neural network model, obtaining the communication connection mode of the lower computer, encrypting the data to be transmitted using a corresponding preset encryption mode based on the communication connection mode of the lower computer, obtaining the encrypted data, and generating a target key based on the corresponding preset encryption mode, and transmitting the encrypted data and the target key to the cloud based on the communication connection mode of the lower computer. The present invention determines the communication connection mode based on the device information of the lower computer, and different communication connection modes use different encryption modes to improve the security of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. 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 creative work.
[0017] Figure 1 A flowchart of an encrypted data transmission method based on an active communication connection provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0018] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0019] Embodiment 1 of the present invention provides an encrypted data transmission method based on active communication connection, such as Figure 1 As shown, the method is applied to the lower computer to actively transmit data to the cloud, and the method includes:
[0020] S100, obtaining a historical data list set, wherein the historical data list set includes a plurality of historical data lists and a communication connection mode corresponding to each historical data list, and the historical data list includes characteristic values of a plurality of preset device characteristics corresponding to a historical device.
[0021] S200, obtaining a correlation value r of any two preset device features ab =[∑ n i=1 [(x ai -x a0 )×(y bi -y b0 )]] / [∑ ni=1 [(x ai -x a0 ) 2 ]×[∑ n i=1 (y bi -y b0 ) 2 ]] 1 / 2 , x ai is the ith eigenvalue of the ath first device feature, x a0 is the mean of the n eigenvalues of the a-th first device feature, y bi is the ith eigenvalue of the bth second device feature, y b0 is the average of n feature values of the b-th second device feature, i ranges from 1 to n, n is the number of historical data lists, wherein the first device feature and the second device feature are both preset device features, and the first device feature is different from the second device feature.
[0022] S300, based on the correlation value r ab , get the weight of each preset device feature.
[0023] In one embodiment of the present invention, based on the correlation value, a correlation matrix is obtained, the eigenvalue of the correlation matrix is solved, the eigenvalue of the correlation matrix is obtained, the eigenvalue is normalized, and the normalized eigenvalue is obtained as the weight of the corresponding preset device feature.
[0024] In another embodiment of the present invention, based on the correlation value, a correlation matrix is obtained, the sum of each column of the correlation matrix is obtained, and the sum of each column is normalized to obtain the normalized sum as the weight of the corresponding preset device feature.
[0025] S400, multiplying the feature value in the historical data list by the weight of the corresponding preset device feature to obtain an intermediate value, thereby obtaining an intermediate value list.
[0026] S500, training a neural network model using the intermediate value list and the communication connection method corresponding to the intermediate value list to obtain a target neural network model.
[0027] Specifically, the activation function in the neural network model is the sigmoid function, and the mathematical expression is b=1 / (1+e -z ), where z is the input value and b is the output value.
[0028] In summary, obtain a set of historical data lists, obtain the correlation value of any two preset device features, obtain the weight of each preset device feature, multiply the feature value in the historical data list by the weight of the corresponding preset device feature, obtain the intermediate value, use the intermediate value list and the communication connection method corresponding to the intermediate value list to train the neural network model, and obtain the target neural network model. The present invention adjusts the weight of the preset device features to more accurately obtain the communication connection method.
[0029] S600, obtain the device information and data to be transmitted of the lower computer, and input the device feature information into the target neural network model to obtain the communication connection mode of the lower computer, wherein the device information includes the device ID, the account information stored in the device, and the device feature information; the device feature information is the feature value of the preset device feature corresponding to the lower computer; wherein the communication connection mode is a forward connection between the lower computer and the cloud or a reverse connection between the lower computer and the cloud.
[0030] Wherein, the preset device feature list A={A1, A2, ..., A j , …, A n}, A j is the jth preset device feature, the value range of j is 1 to n, and n is the number of preset device features; the device feature information list BA = {BA1, BA2, ..., BA j , …, BA n}, B.A. j The lower machine corresponds to A j The characteristic value of .
[0031] In one embodiment of the present invention, the preset device characteristics include device usage frequency, device usage time, number of device vulnerabilities, device network packet loss rate, data transmission volume, IP change status, etc.
[0032] Specifically, the communication connection mode is a forward connection between the lower computer and the cloud, which is marked as "1" or "0", and the communication connection mode is a reverse connection between the lower computer and the cloud, which is marked as "0" or "1".
[0033] Specifically, the forward connection between the lower computer and the cloud is that the lower computer actively initiates a connection request to the cloud, and the reverse connection between the lower computer and the cloud is that the cloud waits for the lower computer to initiate a connection request and then establishes a connection.
[0034] S700, based on the communication connection mode of the lower computer, encrypt the data to be transmitted using the corresponding preset encryption mode, obtain the encrypted data, and generate a target key based on the corresponding preset encryption mode.
[0035] S800, based on the communication connection method of the lower computer, transmits the encrypted data and the target key to the cloud.
[0036] In summary, the device information of the lower computer and the data to be transmitted are obtained, the device feature information is input into the target neural network model, the communication connection mode of the lower computer is obtained, based on the communication connection mode of the lower computer, the corresponding preset encryption mode is used to encrypt the data to be transmitted, the encrypted data is obtained, and the target key is generated based on the corresponding preset encryption mode. Based on the communication connection mode of the lower computer, the encrypted data and the target key are transmitted to the cloud. The present invention determines the communication connection mode based on the device information of the lower computer, and different communication connection modes use different encryption methods to improve the security of data transmission.
[0037] Specifically, based on the communication connection mode of the lower computer, the corresponding preset encryption mode is used to encrypt the data to be transmitted, and the encrypted data is obtained, including the following steps:
[0038] When the communication connection mode of the lower computer is a forward connection between the lower computer and the cloud, the first encryption mode is used to perform encryption processing to obtain encrypted data.
[0039] When the communication connection mode of the lower computer is a forward connection between the lower computer and the cloud, the second encryption mode is used for encryption processing to obtain encrypted data, wherein the first encryption mode is different from the second encryption mode.
[0040] Further, when the communication connection mode of the lower computer is a forward connection between the lower computer and the cloud, the first encryption mode is used for encryption processing to obtain encrypted data, including:
[0041] The package name of the data to be transmitted is hashed using the SHA-256 hash algorithm to obtain a 256-bit target hash value.
[0042] Specifically, the package name of the data to be transmitted is stored in the header of the data to be transmitted, and during the data transmission process, the package name of the data to be transmitted is not encrypted.
[0043] The 256-bit target hash value is subjected to dimensionality reduction processing to obtain a 158-bit intermediate hash value. Those skilled in the art know that any dimensionality reduction processing method in the prior art belongs to the protection scope of the present invention and will not be described in detail here.
[0044] The metadata of the data to be transmitted is obtained, and the metadata of the data to be transmitted is hashed using the MD5 hash algorithm to obtain a 158-bit metadata hash value.
[0045] The 158-bit intermediate hash value and the 158-bit metadata hash value are combined in a preset combination method to obtain a 256-bit intermediate string, wherein the preset combination method at least includes a front-to-back splicing method in which the target hash value is in front and the metadata hash value is in the back. It can be understood that the 158-bit intermediate hash value and the 158-bit metadata hash value are combined into a 256-bit intermediate string, and 256 bits is the length of a commonly used hash value. Therefore, the present invention is disguised as a 256-bit intermediate string to improve the security of the encryption key.
[0046] Get several preset strings as designated strings, and perform bitwise addition of the designated strings and the 256-bit intermediate string to get the target data as the encryption key, wherein the number of bits of the preset string is 256 bits, and the preset string and the unique identifier of the preset string are stored in the lower computer and the cloud at the same time.
[0047] The data to be transmitted is symmetrically encrypted using an encryption key, and the transmission data is obtained as encrypted data, wherein the encrypted data also includes a package name of the data to be transmitted and metadata of the data to be transmitted.
[0048] In summary, when the communication connection mode of the lower computer is a forward connection between the lower computer and the cloud, the package name of the data to be transmitted is hashed using the SHA-256 hash algorithm to obtain a 256-bit target hash value, the 256-bit target hash value is subjected to dimensionality reduction processing to obtain a 158-bit intermediate hash value, the metadata of the data to be transmitted is obtained, and the metadata of the data to be transmitted is hashed using the MD5 hash algorithm to obtain a 158-bit metadata hash value, several preset character strings are obtained as designated character strings, and the designated character string and the 256-bit intermediate character string are bitwise added, the target data is obtained as an encryption key, the encryption key is used to perform symmetric encryption on the data to be transmitted, and the transmission data is obtained as encrypted data. The present invention encrypts the data to be transmitted by multiple encryption means, improves the security of the encryption key, and is less likely to be cracked.
[0049] Furthermore, generating a target key based on a corresponding preset encryption method includes:
[0050] When the communication connection mode of the lower computer is a forward connection between the lower computer and the cloud, an identifier of a specified string is used as the target key based on a preset combination mode.
[0051] Further, when the communication connection mode of the lower computer is a reverse connection between the lower computer and the cloud, the second encryption mode is used for encryption processing to obtain encrypted data, including the following steps:
[0052] Perform a hash operation on the device feature information to obtain a 256-bit feature string.
[0053] Get a preset string and record it as a random string, perform bitwise addition of the random string and the characteristic string to get the specified string.
[0054] Use the specified string to encrypt the device feature information, obtain the feature data, and use the feature data and transmission data as encrypted data.
[0055] Furthermore, generating a target key based on a corresponding preset encryption method includes:
[0056] When the communication connection mode of the lower computer is a reverse connection between the lower computer and the cloud, a first key is generated based on the identifier of the random string, a second key is generated based on the preset combination mode and the identifier of the specified string, and a target key is generated based on the first key and the second key.
[0057] In summary, when the communication connection mode of the lower machine is a reverse connection between the lower machine and the cloud, the device feature information is hashed to obtain a 256-bit feature string, a preset string is taken as a random string, the random string and the feature string are bitwise added to obtain a specified string, the device feature information is encrypted using the specified string, the feature data is obtained, and the feature data and the transmission data are used as encrypted data. It is easier to bypass the restrictions of the firewall during the reverse connection and improve the success rate of the connection, but it is also easy to expose information. Therefore, the present invention adds device feature information during the reverse connection to ensure the security of the data to be transmitted.
[0058] Specifically, when the cloud receives the encrypted data and the target key through the reverse connection, it executes the following steps:
[0059] The first key and the second key are obtained based on the target key.
[0060] A random character string is acquired based on the first key, and a feature character string is acquired based on the random character string and a designated character string of the encrypted data.
[0061] Obtain a historical device hash value pre-stored in the cloud, where the historical device hash value is a 256-bit character obtained by performing a hash operation on device feature information of the historical device.
[0062] The feature string and the historical device hash value are compared to generate a corresponding similarity value. Those skilled in the art know that any method of obtaining the similarity between hash values in the prior art belongs to the protection scope of the present invention and will not be described in detail here.
[0063] If the similarity value is greater than a preset similarity threshold, the second key is parsed to obtain the data to be transmitted. The preset similarity threshold can be set according to actual needs, and optionally, the preset similarity threshold has a value range of 0.5 to 1; preferably, the preset similarity threshold has a value range of 0.85 to 0.95.
[0064] If the similarity value is not greater than the preset similarity threshold, no further analysis is performed and the encrypted data is discarded.
[0065] Further, if the similarity value is greater than a preset similarity threshold, the second key is parsed to obtain the data to be transmitted, further comprising:
[0066] If the similarity is greater than a preset similarity threshold, the second key is parsed to obtain a preset combination method and an identifier of a specified character string.
[0067] The encryption key is obtained based on the package name of the data to be transmitted, the metadata of the data to be transmitted, the preset combination method and the identifier of the specified string.
[0068] The encryption key is used to parse the transmitted data to obtain the data to be transmitted.
[0069] In summary, when the cloud receives the encrypted data and the target key through a reverse connection, the first key and the second key are obtained based on the target key, a random string is obtained based on the first key, and a feature string is obtained based on the random string and the specified string of the encrypted data, and the historical device hash value pre-stored in the cloud is obtained, and the feature string and the historical device hash value are used for comparison to generate a corresponding similarity value. If the similarity value is greater than a preset similarity threshold, the second key is parsed to obtain the data to be transmitted. If the similarity value is not greater than the preset similarity threshold, no further parsing is performed and the encrypted data is discarded. When the cloud receives the encrypted data through a reverse connection, the device feature information is compared first to prevent the cloud from receiving forged data, thereby improving security.
[0070] Furthermore, after the encrypted data and the target key are transmitted to the cloud, when the lower computer checks the stored data in the cloud, it also includes:
[0071] Based on the account information of the login device, the login account level is obtained, wherein the memory stores the account level correspondence relationship. Based on the account level correspondence relationship, the account information of the login device is used for mapping to obtain the login account level.
[0072] The communication connection mode between the lower computer and the cloud is obtained, and based on the communication connection mode, a designated correction level is obtained, wherein the communication connection mode is a forward connection between the lower computer and the cloud or a reverse connection between the lower computer and the cloud, and the preset correction level corresponding to the forward connection is different from the preset correction level corresponding to the reverse connection. The designated correction level is one of the preset correction level corresponding to the forward connection and the preset correction level corresponding to the reverse connection.
[0073] Specifically, the preset correction level corresponding to the forward connection between the lower computer and the cloud is smaller than the preset correction level corresponding to the reverse connection between the lower computer and the cloud.
[0074] Furthermore, the lower computer is forwardly connected to the cloud, and the preset correction level is level one; the lower computer is reversely connected to the cloud, and the preset correction level is level two.
[0075] Based on the login account level and the specified revision level, the target level of the account that logs into the lower computer is obtained. The target level is the sum of the login account level and the specified revision level.
[0076] Based on the target level of the lower-machine device ID and the account of the login device, the corresponding space in the cloud is opened to the target lower-machine, wherein the target lower-machine processes data in the space opened in the cloud.
[0077] In summary, the device information of the target lower machine that logs in to the cloud is obtained, the login account level is obtained based on the account information of the login device, the communication connection method between the lower machine and the cloud is obtained, and based on the communication connection method, the specified correction level is obtained, based on the login account level and the specified correction level, the target level of the account that logs in to the lower machine is obtained, and based on the lower machine device ID and the target level of the account that logs in to the device, the corresponding space in the cloud is opened to the target lower machine. The present invention isolates the storage space of the lower machine in the cloud, and the levels of the account logging in to the lower machine in the cloud, the communication connection methods are different, and the open spaces are different, thereby enhancing the security of the data, and through the different target levels, provides better flexibility without interfering with each other on the same platform.
[0078] Furthermore, when the lower computer modifies the storage content of the storage space corresponding to the cloud, the modified storage content is stored in the designated space corresponding to the target level, and the storage content of the designated space is not visible to the accounts of the lower computers below the target level.
[0079] The higher the target level, the smaller the designated space corresponding to the target level. It can be understood that the lowest level corresponds to the largest space, so that most accounts can use the space. As the level increases, the corresponding accounts become fewer and the corresponding designated space becomes smaller, making the space used by the accounts more reasonable.
[0080] An embodiment of the present invention also provides a non-transitory computer-readable storage medium, which can be set in an electronic device to store at least one instruction or at least one program related to implementing a method in a method embodiment. The at least one instruction or the at least one program is loaded and executed by the processor to implement the method provided in the above embodiment.
[0081] An embodiment of the present invention further provides an electronic device, comprising a processor and the aforementioned non-transitory computer-readable storage medium.
[0082] Although some specific embodiments of the present invention have been described in detail by way of example, it should be understood by those skilled in the art that the above examples are only for illustration, not for limiting the scope of the present invention. It should also be understood by those skilled in the art that various modifications may be made to the embodiments without departing from the scope and spirit of the present invention.
Claims
1. A method for transmitting encrypted data based on active communication connection, characterized in that: Applied to the lower computer actively transmitting data to the cloud, the method includes: Acquire a historical data list set, the historical data list set including a plurality of historical data lists and a communication connection mode corresponding to each historical data list, the historical data list including characteristic values of a plurality of preset device characteristics corresponding to a historical device; Get the correlation value r of any two preset device features ab =[∑ n i=1 [(x ai -x a0 )×(y bi -y b0 )]] / [∑ n i=1 [(x ai -x a0 ) 2 ]×[∑ n i=1 (y bi -y b0 ) 2 ]] 1 / 2 , x ai is the ith eigenvalue of the ath first device feature, x a0 is the mean of the n eigenvalues of the a-th first device feature, y bi is the ith eigenvalue of the bth second device feature, y b0 is the average of n feature values of the b-th second device feature, i ranges from 1 to n, n is the number of historical data lists, wherein the first device feature and the second device feature are both preset device features, and the first device feature is different from the second device feature; Based on the correlation value r ab , obtain the weight of each preset device feature; Multiply the feature value in the historical data list by the weight of the corresponding preset device feature to obtain an intermediate value, thereby obtaining an intermediate value list; The neural network model is trained using the intermediate value list and the communication connection method corresponding to the intermediate value list to obtain the target neural network model; Obtain the device information and data to be transmitted of the lower computer, and input the device feature information into the target neural network model to obtain the communication connection mode of the lower computer, wherein the device information includes the device ID, the account information stored in the device, and the device feature information; the device feature information is the feature value of the preset device feature of the lower computer; wherein the communication connection mode is a forward connection between the lower computer and the cloud or a reverse connection between the lower computer and the cloud; Based on the communication connection mode of the lower computer, encrypt the data to be transmitted using the corresponding preset encryption mode, obtain the encrypted data, and generate the target key based on the corresponding preset encryption mode; Based on the communication connection method of the lower computer, the encrypted data and target key are transmitted to the cloud.
2. The method for transmitting encrypted data based on active communication connection according to claim 1, characterized in that: Based on the communication connection mode of the lower computer, the corresponding preset encryption mode is used to encrypt the data to be transmitted, and the encrypted data is obtained, including the following steps: When the communication connection mode of the lower computer is a forward connection between the lower computer and the cloud, the first encryption mode is used to perform encryption processing to obtain encrypted data; When the communication connection mode of the lower computer is a reverse connection between the lower computer and the cloud, the second encryption mode is used for encryption processing to obtain encrypted data, wherein the first encryption mode is different from the second encryption mode.
3. The method for encrypted data transmission based on active communication connection according to claim 2, characterized in that: When the communication connection mode of the lower computer is a forward connection between the lower computer and the cloud, the first encryption mode is used for encryption processing to obtain encrypted data, including: The package name of the data to be transmitted is hashed using the SHA-256 hash algorithm to obtain a 256-bit target hash value; Perform dimensionality reduction processing on the 256-bit target hash value to obtain a 158-bit intermediate hash value; Obtain metadata of the data to be transmitted, and perform a hash operation on the metadata of the data to be transmitted using the MD5 hash algorithm to obtain a 158-bit metadata hash value; Combine the 158-bit intermediate hash value and the 158-bit metadata hash value in a preset combination method to obtain a 256-bit intermediate character string, wherein the preset combination method at least includes a front-to-back splicing method in which the target hash value is in front and the metadata hash value is in the back; Obtain several preset strings as designated strings, and perform bitwise addition of the designated strings and the 256-bit intermediate string to obtain target data as an encryption key, wherein the number of bits of the preset string is 256 bits, and the preset string and the unique identifier of the preset string are stored in the lower computer and the cloud at the same time; The data to be transmitted is symmetrically encrypted using an encryption key, and the transmission data is obtained as encrypted data, wherein the encrypted data also includes a package name of the data to be transmitted and metadata of the data to be transmitted.
4. The method for encrypted data transmission based on active communication connection according to claim 3, characterized in that: Generating a target key based on the corresponding preset encryption method includes: When the communication connection mode of the lower computer is a forward connection between the lower computer and the cloud, an identifier of a specified string is used as the target key based on a preset combination mode.
5. The method for transmitting encrypted data based on active communication connection according to claim 3, characterized in that: When the communication connection mode of the lower computer is a reverse connection between the lower computer and the cloud, the second encryption mode is used for encryption processing to obtain encrypted data, including the following steps: Perform a hash operation on the device feature information to obtain a 256-bit feature string; Obtain a preset string and record it as a random string, perform bitwise addition of the random string and the characteristic string to obtain a specified string; Use the specified string to encrypt the device feature information, obtain the feature data, and use the feature data and transmission data as encrypted data.
6. The method for encrypted data transmission based on active communication connection according to claim 5, characterized in that: Generating a target key based on the corresponding preset encryption method includes: When the communication connection mode of the lower computer is a reverse connection between the lower computer and the cloud, a first key is generated based on the identifier of the random string, a second key is generated based on the preset combination mode and the identifier of the specified string, and a target key is generated based on the first key and the second key.
7. The method for encrypted data transmission based on active communication connection according to claim 6, characterized in that: When the cloud receives the encrypted data and the target key through the reverse connection, it performs the following steps: Obtaining a first key and a second key based on the target key; Obtaining a random character string based on the first key, and obtaining a characteristic character string based on the random character string and a designated character string of the encrypted data; Obtain a historical device hash value pre-stored in the cloud, where the historical device hash value is a 256-bit string obtained by performing a hash operation on device feature information of the historical device; Use the characteristic string and the historical device hash value to compare and generate the corresponding similarity value; If the similarity value is greater than a preset similarity threshold, the second key is parsed to obtain the data to be transmitted; If the similarity value is not greater than the preset similarity threshold, no further analysis is performed and the encrypted data is discarded.
8. The method for encrypted data transmission based on active communication connection according to claim 7, characterized in that: If the similarity value is greater than a preset similarity threshold, the second key is parsed to obtain the data to be transmitted, further comprising: If the similarity is greater than a preset similarity threshold, the second key is parsed to obtain a preset combination method and an identifier of a specified string; Obtaining an encryption key based on a package name of the data to be transmitted, metadata of the data to be transmitted, a preset combination method, and an identifier of a specified string; The encryption key is used to parse the transmitted data to obtain the data to be transmitted.
9. A non-transitory computer-readable storage medium, wherein at least one instruction or at least one program is stored in the storage medium, characterized in that: The at least one instruction or the at least one program is loaded and executed by the processor to implement the encrypted data transmission method based on active communication connection as described in any one of claims 1 to 8.
10. An electronic device, characterized in that: The invention comprises a processor and the non-transitory computer-readable storage medium as claimed in claim 9.
Citation Information
Patent Citations
Communication information encryption method and device, and electronic equipment
CN108111667A
Network communication encryption and decryption methods and electronic equipment
CN109450852A