Internet of Things secure transmission method and system based on data encryption
By using edge computing servers in IoT devices to generate keys and encrypting data based on environmental characteristics, calculating the importance of data packets and transmission impact factors, transmitting data packets in segments, and dynamically adjusting transmission paths and bandwidth resources, the problem of IoT devices is solved Data transmission security and delay issues are addressed to achieve efficient and reliable data transmission.
Patent Information
- Application Number
- CN202410846108.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2024-09-13
AI Technical Summary
IoT devices are easily attacked during data transmission in public places such as shopping malls and factories. Due to network congestion or improper selection of transmission paths, data transmission delays are high, affecting real-time response capabilities.
Using a secure transmission method for the Internet of Things based on data encryption, an initial key container is generated through the edge computing server, a symmetric key is generated based on environmental characteristic data, the data is encrypted, and the importance coefficient and transmission impact factor of the data packet are calculated, segmented Transmit data packets and dynamically adjust transmission paths and bandwidth resources.
Effectively prevent data from being intercepted and tampered with, reduce transmission delays, improve data transmission efficiency and reliability, and ensure data security and integrity.
Smart Images

Figure CN118647019A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data transmission, and in particular to a data encryption-based secure transmission method and system for the Internet of Things. Background Art
[0002] With the rapid development of Internet of Things (IoT) technology, the widespread application of various smart devices has gradually penetrated into people's daily life and work. IoT devices are connected through wireless networks to achieve data exchange and remote control between devices, greatly improving production efficiency and convenience of life.
[0003] However, during the data transmission process of IoT devices in public places such as shopping malls and factories, IoT devices transmit data through wireless networks, which can be easily intercepted by attackers, resulting in the leakage of sensitive information; and due to network congestion or improper selection of transmission paths, data transmission delay is high, which greatly affects the real-time response capability of IoT devices.
[0004] Therefore, how to increase the security and stability of data transmission in IoT data is an issue that needs to be urgently solved and optimized in the secure transmission of IoT data. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide a data encryption-based Internet of Things secure transmission method and system, which can encrypt data in combination with environmental characteristics, reasonably allocate transmission paths and bandwidth resources, and improve the security transmission efficiency of Internet of Things data.
[0006] In order to solve the above technical problems, the technical solution of the present invention is as follows:
[0007] In a first aspect, a secure transmission method for the Internet of Things based on data encryption is provided, the method comprising:
[0008] Use the edge computing server to generate an initial key container, register each sensor node in the Internet of Things with the edge computing server, and receive the initial key container;
[0009] Environmental data is collected through sensor nodes and combined with environmental factors to obtain environmental characteristic data;
[0010] The sensor node generates a symmetric key and encrypts the environmental characteristic data to obtain a data packet to be transmitted;
[0011] Calculating the importance coefficient of the data packet to be transmitted in the Internet of Things, and segmenting the data packet to be transmitted to obtain multiple data packet fragments;
[0012] Calculating a transmission impact factor of each data packet fragment, and determining a transmission path of each data packet fragment according to a transmission attribute of each transmission path;
[0013] Calculate the transmission adjustment coefficient of each transmission path at the current moment according to the transmission impact factor of the data packet fragment and the transmission attribute of the transmission path to which it belongs;
[0014] The attribute of each transmission path at the current moment is adjusted according to the transmission adjustment coefficient, and the data packet fragment is transmitted.
[0015] Furthermore, the environmental data includes temperature data, humidity data, human flow data and equipment status data; the environmental factors include time data, location data and weather condition data.
[0016] Further, the sensor node generates a symmetric key and encrypts the environmental characteristic data to obtain a data packet to be transmitted, including:
[0017] Generate random numbers using the sensor node’s built-in secure random number generator;
[0018] Use the random number as a seed and generate a symmetric key through a pseudo-random number generation algorithm;
[0019] Encrypting the environmental feature data using the symmetric key and the lightweight AES algorithm to obtain a ciphertext;
[0020] The ciphertext, random number and metadata are packaged to obtain a data packet to be transmitted.
[0021] Further, the importance coefficient of the data packet to be transmitted in the Internet of Things is calculated, and the data packet to be transmitted is segmented to obtain multiple data packet fragments, including:
[0022] Compare the relative importance of environmental data and environmental factors and construct a judgment matrix;
[0023] Calculate the maximum eigenvalue and corresponding eigenvector of the judgment matrix, and normalize the eigenvector;
[0024] According to the characteristic vector, the importance coefficient I of the transmitted data packet is calculated by the formula: I=w1T+w2H+w3F+w4S+w5t+w6l+w7w, wherein T, H, F, S, t, l, w are temperature data, humidity data, flow data, equipment status data, time data, location data and weather condition data respectively; w1, w2, w3, w4, w5, w6, w7 are the corresponding elements in the characteristic vector respectively;
[0025] According to the transmission data packet size and importance coefficient, the formula is: Determine the number of segments N, where S C is the size of the transmitted data packet, S0 is the basic segmentation unit, To round up;
[0026] The transmission data packet is segmented according to the segment number to obtain multiple data packet fragments.
[0027] Furthermore, the transmission impact factor of each data packet fragment is calculated, including:
[0028] By formula: Calculate the transmission impact factor of each packet fragment, where P i is the transmission impact factor of the i-th data packet fragment, α1, α2, α3 and α4 are preset weight coefficients, I is the importance coefficient of the data packet to be transmitted, T i , H i 、F i , S i ,t i , l i 、w i They are respectively the temperature data, humidity data, human flow data, equipment status data, time data, location data and weather condition data in the i-th data packet segment.
[0029] Further, determining the transmission path of each data packet fragment according to the transmission attribute of each transmission path includes:
[0030] The particle swarm size is determined according to the number of packet fragments and the number of transmission paths, wherein each particle represents a possible transmission path combination;
[0031] Initialize the position x of each particle i is a randomly selected transmission path combination, and the velocity v of each particle is initialized i is a random vector;
[0032] Update particle speed and position in real time;
[0033] For each particle, the formula: Calculate its fitness f(x i ), where P j Transmission impact factor of packet segment j; The transmission path x selected for particle i ij Available bandwidth; The transmission path x selected for particle i ij Delays; The transmission path x selected for particle i ij The packet loss rate; λ is the weight coefficient for adjusting the impact of the packet loss rate;
[0034] If the fitness value of the current particle is better than the fitness value of the historical optimal position, the historical optimal position of the particle is updated to p i,best=x i (t);
[0035] If the fitness value of the current particle is better than the fitness value of the global optimal position, the global optimal position is updated to g best =x i (t), repeat the iteration until the stopping condition is met;
[0036] Output the global optimal position g best The corresponding transmission path combination is used to obtain the optimal transmission path for each data packet fragment.
[0037] Furthermore, according to the transmission impact factor of the data packet fragment and the transmission attribute of the transmission path to which it belongs, the transmission adjustment coefficient of each transmission path at the current moment is calculated, including:
[0038] By formula: Calculate the transmission adjustment coefficient of each transmission path at the current moment to adjust the bandwidth allocation of each transmission path at the current moment; where β j is the transmission adjustment coefficient of transmission path j; α, ε, γ, δ are weight parameters respectively; P j Transmission impact factor of packet segment j; is the sum of the transmission priority coefficients of all packet fragments; B 总 is the sum of bandwidths of all transmission paths; it can be the amount of packet fragments transmitted on transmission path j at the current moment; B j The bandwidth of transmission path j; is the logarithmic term of the load factor on the transmission path j at the current moment; L j is the delay of transmission path j; max(L) is the maximum delay value among all transmission paths; R j Packet loss rate of transmission path j; J j Jitter of transmission path j.
[0039] In the second aspect, an IoT secure transmission system based on data encryption includes:
[0040] A generation module is used to generate an initial key container using an edge computing server, register each sensor node in the Internet of Things with the edge computing server, and receive the initial key container;
[0041] The acquisition module is used to collect environmental data through sensor nodes and combine it with environmental factors to obtain environmental characteristic data;
[0042] The encryption module is used to enable the sensor node to generate a symmetric key and encrypt the environmental characteristic data to obtain a data packet to be transmitted;
[0043] A partitioning module is used to calculate the importance coefficient of the data packet to be transmitted in the Internet of Things, and to segment the data packet to be transmitted to obtain multiple data packet fragments;
[0044] A calculation module, used to calculate the transmission impact factor of each data packet fragment, and determine the transmission path of each data packet fragment according to the transmission attribute of each transmission path;
[0045] An adjustment module, used to calculate a transmission adjustment coefficient of each transmission path at the current moment according to a transmission impact factor of a data packet segment and a transmission attribute of the transmission path to which it belongs;
[0046] The transmission module is used to adjust the attribute of each transmission path at the current moment according to the transmission adjustment coefficient and transmit the data packet fragment.
[0047] According to a third aspect, a computing device includes:
[0048] one or more processors;
[0049] The storage device is used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the above method.
[0050] In a fourth aspect, a computer-readable storage medium stores a program, and the program implements the above method when executed by a processor.
[0051] The above solution of the present invention includes at least the following beneficial effects:
[0052] The above-mentioned scheme of the present invention can effectively prevent data from being intercepted, tampered with and forged by encrypting IoT data in combination with environmental characteristics, thereby ensuring the security and integrity of data transmission; through segmented and parallel transmission, it can reasonably allocate transmission paths and bandwidth resources in combination with the importance and real-time requirements of IoT data, significantly reduce transmission delays, and improve data transmission efficiency; it can adjust the transmission path in real time, reduce path jitter and packet loss, and ensure the reliability and stability of IoT data. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a flow chart of a method for secure transmission of the Internet of Things based on data encryption provided by an embodiment of the present invention.
[0054] Figure 2 It is a module schematic diagram of an Internet of Things secure transmission system based on data encryption provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0055] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0056] like Figure 1 As shown, an embodiment of the present invention proposes an IoT secure transmission method based on data encryption, the method comprising:
[0057] Step 1: Use the edge computing server to generate an initial key container, register each sensor node in the Internet of Things with the edge computing server, and receive the initial key container;
[0058] Step 2: Collect environmental data through sensor nodes and combine them with environmental factors to obtain environmental feature data;
[0059] Step 3, enabling the sensor node to generate a symmetric key and encrypt the environmental characteristic data to obtain a data packet to be transmitted;
[0060] Step 4, calculating the importance coefficient of the data packet to be transmitted in the Internet of Things, and segmenting the data packet to be transmitted to obtain multiple data packet fragments;
[0061] Step 5, calculating the transmission impact factor of each data packet fragment, and determining the transmission path of each data packet fragment according to the transmission attribute of each transmission path;
[0062] Step 6, calculating the transmission adjustment coefficient of each transmission path at the current moment according to the transmission impact factor of the data packet segment and the transmission attribute of the transmission path to which it belongs;
[0063] Step 7: adjust the attributes of each transmission path at the current moment according to the transmission adjustment coefficient, and transmit the data packet fragments.
[0064] In the IoT secure transmission method based on data encryption described in an embodiment of the present invention, the edge computing server is a computing device deployed close to the data source (such as a sensor node) in the IoT system, and its main function is to provide computing, storage and network resources to process locally generated data and reduce data transmission delays and bandwidth requirements.
[0065] In the above steps of the embodiment of the present invention, an initial key container is generated by the edge computing server and distributed to each sensor node, which can ensure the secure generation and management of the key. The edge computing server has strong computing power and can efficiently generate and distribute keys, reducing the computing burden of the sensor nodes, allowing them to focus on data collection and transmission. By collecting environmental data and combining it with environmental factors, environmental feature data is generated to make the encryption process of each data packet unique, preventing attackers from cracking data through pattern recognition. The sensor node generates a symmetric key and encrypts the environmental feature data, which can effectively prevent the data from being stolen and tampered with during transmission, ensuring the confidentiality and integrity of the transmitted data. By calculating the importance coefficient of the data packet, the priority of the data can be distinguished, the importance of different data can be effectively managed, and the importance of different data can be managed according to the importance. The data packet is segmented according to the transmission coefficient to generate multiple data packet fragments, which can not only improve the transmission efficiency, but also reduce the delay of the data packet during the transmission process, ensuring that high-priority data can be delivered in time; the transmission impact factor of each data packet fragment is calculated, and combined with the properties of the transmission path, the optimal path is selected, the delay and loss of data packet transmission are reduced, and the transmission reliability is improved; by comprehensively calculating the transmission impact factor and the properties of the transmission path, calculating the transmission adjustment coefficient, and dynamically allocating bandwidth resources, it can ensure that the bandwidth utilization of each path is maximized, avoiding network congestion and waste of resources; according to the calculated transmission adjustment coefficient, the properties of each transmission path are adjusted in real time to ensure the efficiency and stability of data transmission; it ensures that the data packet fragments can be transmitted on the optimal path, reducing transmission delay and packet loss rate, and improving transmission quality and user experience.
[0066] In the above step 1 of this embodiment, the initial key container provides a set of initial security keys for use by sensor nodes during registration and communication. The initial key container can be generated by the edge computing server using a secure random number generation algorithm. These keys ensure the confidentiality and integrity of data transmission. By pre-generating and securely distributing these keys, the computational burden and security risks when dynamically generating keys between sensor nodes and servers can be reduced, thereby improving the overall security and efficiency of the system. Sensor nodes are various modules for collecting information in the Internet of Things, such as temperature sensors, humidity sensors, cameras, etc. Each sensor node needs to send a registration request to the edge computing server to indicate its existence and request to obtain the initial key container. Then, the edge computing server sends the initial key container to the sensor node. The sensor node calculates the Euclidean distance between its own geographical location and the position of each key in the key container, and then selects a key with a closer distance for pre-distribution based on the calculated distance so that subsequent keys can be used during data transmission.
[0067] In the above step 2 of this embodiment, the environmental data includes temperature, humidity, human flow, and equipment status, and the environmental factors include time, location, and weather conditions. In the scenario of a shopping mall or factory, temperature refers to the ambient temperature value detected by the temperature sensor, which is used to monitor and control the temperature in the shopping mall or factory to ensure the normal operation of the equipment and the comfort of personnel; humidity refers to the moisture content in the air detected by the humidity sensor, which is used to monitor and adjust the humidity level of the environment; human flow refers to the number of people passing through a specific area detected by the sensor, which is used to analyze and optimize the flow of personnel; equipment status refers to the operating status of the equipment monitored by the sensor, such as on / off, fault, working mode, etc.; time refers to the specific time point or time period of data collection, which is used to analyze the time dimension of the data; location refers to the specific geographical location or place of data collection, which is used to locate the source of data; weather conditions refer to the external weather conditions when data is collected, such as sunny days, rainy days, temperature, humidity, wind speed, etc., which are used to analyze the impact of the external environment on the internal environment and equipment; and the environmental characteristic data obtained by combining environmental factors can optimize resource allocation, for example, giving priority to transmitting important data during high human flow periods.
[0068] In a preferred embodiment of the present invention, the above step 3, which enables the sensor node to generate a symmetric key and encrypt the environmental characteristic data to obtain a data packet to be transmitted, includes:
[0069] Step 31, generating a random number using the built-in secure random number generator of the sensor node;
[0070] Step 32, using the random number as a seed and generating a symmetric key through a pseudo-random number generation algorithm;
[0071] Step 33, encrypting the environmental feature data using the symmetric key and the lightweight AES algorithm to obtain a ciphertext;
[0072] Step 34, packing the ciphertext, random number and metadata to obtain a data packet to be transmitted.
[0073] In the above steps of this embodiment, a random number can be generated by using the built-in secure random number generator (such as TRNG or DRBG) of the sensor node, and then a symmetric key can be generated by a pseudo-random number generation algorithm (such as HMAC-DRBG or AES-CTR-DRBG); then the environmental feature data is encrypted by the symmetric key and the lightweight AES algorithm to obtain an encrypted ciphertext, wherein the lightweight AES algorithm is a widely used symmetric encryption algorithm with the characteristics of high efficiency and security; through the use of encryption and random numbers, the confidentiality and integrity of the data during transmission can be ensured to prevent data leakage and tampering; then the ciphertext, random number and metadata are combined into a data packet structure, and by adding metadata, the receiving end can verify the source and order of the data packet, which is helpful for data tracking and management; and the metadata includes the identification information of the sensor node, the timestamp of the data packet, the serial number of the data packet, etc., which is used by the receiving end to verify the source and order of the data packet.
[0074] In a preferred embodiment of the present invention, the above step 4 calculates the importance coefficient of the data packet to be transmitted in the Internet of Things, and segments the data packet to be transmitted to obtain multiple data packet fragments, including:
[0075] Step 41, comparing the relative importance of environmental data and environmental factors, and constructing a judgment matrix;
[0076] Step 42, calculating the maximum eigenvalue and the corresponding eigenvector of the judgment matrix, and normalizing the eigenvector;
[0077] Step 43, according to the characteristic vector, the importance coefficient I of the transmission data packet is calculated by the formula: I=w1T+w2H+w3F+w4S+w5t+w6l+w7w, wherein T, H, F, S, t, l, w are temperature data, humidity data, human flow data, equipment status data, time data, location data and weather condition data respectively; w1, w2, w3, w4, w5, w6, w7 are the corresponding elements in the characteristic vector respectively;
[0078] Step 44, according to the size of the transmission data packet and the importance coefficient, by the formula: Determine the number of segments N, where S C is the size of the transmitted data packet, S0 is the basic segmentation unit, To round up;
[0079] Step 45, segmenting the transmission data packet according to the number of segments to obtain a plurality of data packet fragments.
[0080] In the above step 41 of this embodiment, the judgment matrix is a matrix used to compare the relative importance of every two factors. In the judgment matrix, each element a ijrepresents the importance of the i-th factor relative to the j-th factor, and the basis for comparison is predetermined by historical data. In this embodiment, a 9-level scale system is used to represent relative importance, where 1 is equally important, 3 is slightly important, 5 is obviously important, 7 is very important, 9 is absolutely important, and 2, 4, 6, and 8 are all intermediate values. For example, if it is predetermined that temperature T is slightly more important than humidity H, then a TH =3; and then a judgment matrix is constructed through the predetermined relative importance.
[0081] In the above step 42 of this embodiment, the eigenvalues and eigenvectors of the judgment matrix are solved by numerical calculations such as the power method or by using a linear algebra library, where the eigenvectors represent the relative weights of each factor; and then the eigenvectors are normalized so that the sum of their elements is 1, and the final weights of each factor, i.e., w1, w2, w3, w4, w5, w6, and w7, are obtained.
[0082] In the above step 45 of this embodiment, after the number of segments is determined, when the transmission data packet is segmented, the boundaries of each data packet fragment need to be aligned to ensure that each data packet fragment contains a complete logical unit, for example, an entire ciphertext block or an entire metadata block, rather than partial data; and each data packet fragment should contain its sequence number in the entire data packet so that the receiving end can correctly reassemble the data packet, each data packet fragment should also contain the total number of fragments so that the receiving end knows when all fragments have been received, and each data packet fragment should contain a checksum for detecting errors in transmission; if the data packet size cannot be divided by the number of segments, data needs to be filled in the last data packet fragment (such as zero padding) to ensure that all fragments are of the same size.
[0083] In the above steps of the embodiment of the present invention, a judgment matrix is constructed to comprehensively consider various environmental factors such as temperature, humidity, human flow, equipment status, time, location and weather conditions, and the judgment matrix is used to determine the relative importance of each environmental factor, thereby improving the accuracy of data packet importance assessment; by calculating the maximum eigenvalue and the corresponding eigenvector of the judgment matrix and normalizing the eigenvector, it is possible to ensure that the relative proportional relationship of the weights of each environmental factor remains consistent, thereby improving the accuracy of importance coefficient calculation; by calculating the importance coefficient, it is possible to dynamically reflect the current environmental changes and changes in data characteristics, thereby ensuring the flexible adjustment of data transmission strategies, thereby improving Real-time and effectiveness of data transmission; adaptively determine the number of segments according to the importance coefficient and size of the data packet, ensure that the segmentation of high-importance data packets is more refined, and the segmentation of low-importance data packets is more rough, thereby improving the flexibility and efficiency of data transmission; better utilize the bandwidth and delay characteristics of the transmission path, optimize the transmission strategy, and improve the overall performance of data transmission; reasonable segmentation of data packets can realize segmented parallel transmission, improve bandwidth utilization, reduce transmission delay, improve the real-time and reliability of data transmission, and also improve the fault tolerance of the system. Problems with data packets in a segment will not affect the data transmission of other segments, thereby improving the stability and reliability of data transmission.
[0084] In a preferred embodiment of the present invention, the above step 5, calculating the transmission impact factor of each data packet fragment and determining the transmission path of each data packet fragment according to the transmission attribute of each transmission path, includes:
[0085] Step 51, by formula: Calculate the transmission impact factor of each packet fragment, where P i is the transmission impact factor of the i-th data packet fragment, α1, α2, α3 and α4 are preset weight coefficients, I is the importance coefficient of the data packet to be transmitted, T i , H i 、F i , S i ,t i , l i 、w i They are respectively the temperature data, humidity data, human flow data, equipment status data, time data, location data and weather condition data in the i-th data packet segment;
[0086] Step 52, determining the particle swarm size according to the number of data packet fragments and the number of transmission paths, wherein each particle represents a possible transmission path combination;
[0087] Step 53, initialize the position x of each particle iis a randomly selected transmission path combination, and the velocity v of each particle is initialized i is a random vector;
[0088] Step 54, by formula: v i (t+1)=ωv i (t)+c1 r1(p i,best -x i (t))+c2 r2(g best -x i (t)), the particle velocity is updated, where v i (t+1) is the velocity of particle i at time t+1; ω is the inertia weight, which is used to balance the global search and local search capabilities; c1, c2 are acceleration constants, ranging from [0,2]; r1, r2 are random numbers between [0,1]; p i,best is the historical optimal position of particle i; g best is the global optimal position of the entire particle swarm;
[0089] Step 55, by formula: x i (t+1)=x i (t)+v i (t+1), update the particle position, where x i (t+1) is the position of particle i at time t+1;
[0090] Step 56, for each particle, use the formula: Calculate its fitness f(x i ), where P j Transmission impact factor of packet segment j; The transmission path x selected for particle i ij Available bandwidth; The transmission path x selected for particle i ij Delays; The transmission path x selected for particle i ij The packet loss rate; λ is the weight coefficient for adjusting the impact of the packet loss rate;
[0091] Step 57: If the fitness value of the current particle is better than the fitness value of the historical optimal position, the historical optimal position of the particle is updated to p. i.best =x i (t);
[0092] If the fitness value of the current particle is better than the fitness value of the global optimal position, the global optimal position is updated to g best =x i (t), repeat the iteration until the stopping condition is met;
[0093] Step 58: Output the global optimal position g best The corresponding transmission path combination is used to obtain the optimal transmission path for each data packet fragment.
[0094] In the above step 51 of this embodiment, It represents the combined influence of important coefficients and time factors, location factors, and weather conditions; Indicates the relative importance of equipment status factors under the influence of ambient temperature and humidity factors; Indicates the relative importance of the combined effect of human flow and location factors; α4×(sin(T i ·t i )+cos(H i ·l i )) represents the combined influence of temperature, time, humidity and location; by comprehensively considering the specific characteristics and environmental factors in each data packet fragment, it can provide accurate priority evaluation to ensure that important data fragments are transmitted first; it can dynamically adjust the transmission priority to ensure the data transmission effect in different environments; by giving priority to the transmission of important data fragments, it can effectively optimize the utilization of bandwidth and computing resources, avoid resource waste, improve transmission efficiency, and under critical environmental conditions (such as high traffic, equipment abnormalities, etc.), it can increase the priority of key data fragments to ensure their timely and secure transmission, improve the reliability and response speed of the system, and be able to cope with the complex and changeable Internet of Things environment.
[0095] In the above step 52 of this embodiment, the particle swarm size is determined according to the number of data packet fragments and the number of transmission paths. The particle swarm size is the number of particles, wherein the number of particles must be greater than the maximum number of the number of data packet fragments or the number of transmission paths. The position of the particle represents the selection of the transmission path, and the position of each particle is a vector x i , each element corresponds to the transmission path of a packet fragment.
[0096] In the above step 57 of this embodiment, the stopping condition may be set by presetting a maximum number of iterations or setting the fitness value to stop when it no longer changes significantly.
[0097] In a specific implementation, for example, the number of data packet fragments is 3, and the transmission impact factors of each data packet fragment are P1, P2, and P3, respectively. There are three transmission paths selected, and their bandwidth, delay, and packet loss rate are B1, B2, B3, L1, L2, L3, and D1, D2, D3, respectively. First, the particle swarm size is determined to be 5, that is, the number of particles is determined to be 5, and the position vector of each particle represents the transmission path combination, such as x i =[1,2,3]; furthermore, the initial velocity v iRandomly generate, update the speed and position through the above formula; then for each particle, calculate its fitness value Then compare the current fitness value with the historical optimal value, update the local and global optimal positions, and stop the iteration after reaching the maximum number of iterations or the fitness value is stable, and finally obtain the optimal transmission path combination g best , for example [2,3,1], means that the first data packet fragment selects transmission path 2, the second data packet fragment selects transmission path 3, and the third data packet fragment selects transmission path 1.
[0098] In the above steps of the embodiment of the present invention, the transmission impact factor of each data packet fragment is calculated by a formula, so that different data packet fragments can be evaluated according to their importance and environmental characteristics; and the optimal transmission path combination for each data packet fragment can be found to ensure the efficiency and reliability of data transmission; the selection of the optimal transmission path combination can maximize the use of network resources, reduce transmission delay and packet loss rate, and improve overall transmission performance.
[0099] In a preferred embodiment of the present invention, the above step 6, calculating the transmission adjustment coefficient of each transmission path at the current moment according to the transmission impact factor of the data packet segment and the transmission attribute of the transmission path to which it belongs, includes:
[0100] Step 61, by formula: Calculate the transmission adjustment coefficient of each transmission path at the current moment to adjust the bandwidth allocation of each transmission path at the current moment; where β j is the transmission adjustment coefficient of transmission path j; α, ε, γ, δ are weight parameters respectively; P j Transmission impact factor of packet segment j; is the sum of the transmission priority coefficients of all packet fragments; B 总 is the sum of bandwidths of all transmission paths; T j The amount of data packet fragments transmitted on transmission path j at the current moment; B j The bandwidth of transmission path j; is the logarithmic term of the load factor on the transmission path j at the current moment; L j is the delay of transmission path j; max(L) is the maximum delay value among all transmission paths; R j Packet loss rate of transmission path j; J j Jitter of transmission path j.
[0101] In the above step 61 of this embodiment, by collecting the transmission impact factor of each data packet segment, the bandwidth and delay of each transmission path, and the data packet segment transmission volume at the current moment, the transmission adjustment coefficient of each transmission path at the current moment can be calculated through the above formula to adjust the bandwidth allocation of each transmission path at the current moment; wherein, represents the calculation of the basic transmission adjustment factor; Indicates the load factor of the calculated transmission path; Indicates the calculation of the transmission delay impact coefficient of the transmission path.
[0102] In the above steps of the embodiment of the present invention, by combining the transmission priority coefficient and other data packet characteristics for calculation, it is ensured that the data packets with high importance are transmitted first during the transmission process, and the risk of data being tampered with or lost during the transmission process is reduced, thereby improving the security and integrity of data transmission; by calculating the transmission adjustment coefficient of each transmission path at the current moment through a formula, bandwidth resources are reasonably allocated to ensure that the bandwidth utilization reaches the optimal state, effectively avoiding the waste of bandwidth resources and improving the data transmission efficiency; by considering the delay of the transmission path and the calculation of its logarithmic and exponential terms, it can be ensured that the path with lower delay obtains bandwidth resources first, which can significantly reduce the overall delay of data transmission and improve the real-time response capability of the Internet of Things device; by introducing the logarithmic term of the load coefficient, the adjustment coefficient of the path with higher load is appropriately reduced, thereby balancing the load of each transmission path and preventing a certain path from being overloaded and affecting the overall transmission performance; for paths with high packet loss rate and high jitter, their adjustment coefficient will be reduced, thereby improving the stability and reliability of the transmission path and reducing the occurrence of transmission errors and interruptions; by calculating multiple factors such as comprehensive transmission priority, bandwidth, load, delay, packet loss rate and jitter, the transmission adjustment coefficient can be adaptively adjusted, intelligently optimize the resource allocation of the transmission path, and achieve efficient dynamic adjustment.
[0103] In the above step 7 of the present embodiment, after calculating the transmission adjustment coefficient of each transmission path at the current moment, the bandwidth of each transmission path at the current moment can be adjusted according to the transmission adjustment coefficient, and then the data packet fragments can be transmitted under the adjusted bandwidth condition; wherein, when transmitting the data packet fragments, each sensor node starts to send the data packet fragments according to the allocated bandwidth, and attaches a unique identifier and transmission path information to each data packet fragment; after the transmission is completed, the receiving end performs error detection (such as CRC check) to ensure the integrity of the data packet; if an error or packet loss is detected, the retransmission mechanism is triggered to retransmit the erroneous data packet fragment or the lost data packet fragment; after the receiving end successfully receives the data segment, it sends an acknowledgment message (ACK), and after receiving the ACK, the sending end confirms that the data transmission is successful and the transmission is completed.
[0104] In the above steps of the embodiment of the present invention, by calculating the transmission adjustment coefficient of each transmission path and adjusting the bandwidth of each transmission path at the current moment according to the coefficient, it is possible to dynamically adapt to changes in network conditions and ensure efficient use of bandwidth resources; it is possible to reduce transmission delays and improve overall transmission efficiency; under the adjusted bandwidth conditions, each sensor node sends data packet fragments according to the allocated bandwidth, which can make full use of the bandwidth of different paths, improve the parallelism of data transmission, and reduce transmission time; a unique identifier and transmission path information are attached to each data packet fragment, so that the receiving end can accurately identify and reassemble the data packet fragments, thereby improving the reliability and accuracy of data transmission; error detection (such as CRC check) is performed at the receiving end to ensure the integrity of the data packet. Integrity: If an error or packet loss is detected, the retransmission mechanism is immediately triggered to retransmit the erroneous data packet fragment or the lost data packet fragment to ensure the integrity and accuracy of the final data; the receiving end sends an acknowledgment message (ACK) after successfully receiving the data segment, and the sending end confirms the successful data transmission after receiving the ACK, which can effectively prevent data packet loss and ensure the reliability and integrity of data transmission; through the dynamic calculation and real-time adjustment of the transmission adjustment coefficient, the bandwidth of each transmission path can be optimally allocated according to the current network conditions, which improves the system's adaptability to changes in network conditions and enhances the flexibility and stability of the transmission process; at the same time, it improves bandwidth utilization, ensures that data can be transmitted to the target node quickly and accurately, and provides users with more reliable and efficient IoT services.
[0105] like Figure 2 As shown, an embodiment of the present invention further provides an Internet of Things secure transmission system based on data encryption, comprising:
[0106] A generation module 10 is used to generate an initial key container using an edge computing server, register each sensor node in the Internet of Things with the edge computing server, and receive the initial key container;
[0107] The acquisition module 20 is used to collect environmental data through sensor nodes and combine it with environmental factors to obtain environmental characteristic data;
[0108] The encryption module 30 is used to enable the sensor node to generate a symmetric key and encrypt the environmental characteristic data to obtain a data packet to be transmitted;
[0109] A division module 40 is used to calculate the importance coefficient of the data packet to be transmitted in the Internet of Things, and to segment the data packet to be transmitted to obtain a plurality of data packet segments;
[0110] A calculation module 50, used to calculate the transmission impact factor of each data packet segment, and determine the transmission path of each data packet segment according to the transmission attribute of each transmission path;
[0111] An adjustment module 60, configured to calculate a transmission adjustment coefficient of each transmission path at a current moment according to a transmission impact factor of the data packet segment and a transmission attribute of the transmission path to which the segment belongs;
[0112] The transmission module 70 is used to adjust the attribute of each transmission path at the current moment according to the transmission adjustment coefficient and transmit the data packet fragment.
[0113] It should be noted that the system is a system corresponding to the above method, and all implementation methods in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.
[0114] The embodiment of the present invention further provides a computing device, comprising: a processor, a memory storing a computer program, wherein when the computer program is executed by the processor, the method described above is executed. All implementations in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.
[0115] The embodiment of the present invention also provides a computer-readable storage medium storing instructions, which, when executed on a computer, enable the computer to execute the method described above. All implementations in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.
[0116] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0117] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0118] In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0119] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0120] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0121] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.
[0122] In addition, it should be noted that in the apparatus and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. Moreover, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but it is not necessary to perform them in chronological order, and some steps can be performed in parallel or independently of each other. For those of ordinary skill in the art, it is understood that all or any steps or components of the method and apparatus of the present invention can be implemented in any computing device (including processors, storage media, etc.) or a network of computing devices in hardware, firmware, software or a combination thereof, which can be achieved by those of ordinary skill in the art using their basic programming skills after reading the description of the present invention.
[0123] Therefore, the purpose of the present invention can also be achieved by running a program or a group of programs on any computing device. The computing device can be a well-known general device. Therefore, the purpose of the present invention can also be achieved by simply providing a program product containing a program code that implements the method or device. That is to say, such a program product also constitutes the present invention, and the storage medium storing such a program product also constitutes the present invention. Obviously, the storage medium can be any well-known storage medium or any storage medium developed in the future. It should also be pointed out that in the device and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. In addition, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but it is not necessary to perform them in chronological order. Some steps can be performed in parallel or independently of each other.
[0124] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A secure transmission method for the Internet of Things based on data encryption, characterized in that: The method comprises: Use the edge computing server to generate an initial key container, register each sensor node in the Internet of Things with the edge computing server, and receive the initial key container; Environmental data is collected through sensor nodes and combined with environmental factors to obtain environmental characteristic data; The sensor node generates a symmetric key and encrypts the environmental characteristic data to obtain a data packet to be transmitted; Calculating the importance coefficient of the data packet to be transmitted in the Internet of Things, and segmenting the data packet to be transmitted to obtain multiple data packet fragments; Calculating a transmission impact factor of each data packet fragment, and determining a transmission path of each data packet fragment according to a transmission attribute of each transmission path; Calculate the transmission adjustment coefficient of each transmission path at the current moment according to the transmission impact factor of the data packet fragment and the transmission attribute of the transmission path to which it belongs; The attribute of each transmission path at the current moment is adjusted according to the transmission adjustment coefficient, and the data packet fragment is transmitted.
2. The Internet of Things secure transmission method based on data encryption according to claim 1 is characterized in that: The environmental data includes temperature data, humidity data, human flow data and equipment status data; the environmental factors include time data, location data and weather condition data.
3. The Internet of Things secure transmission method based on data encryption according to claim 2 is characterized in that: The sensor node generates a symmetric key and encrypts the environmental characteristic data to obtain a data packet to be transmitted, including: Generate random numbers using the sensor node’s built-in secure random number generator; Use the random number as a seed and generate a symmetric key through a pseudo-random number generation algorithm; The environmental characteristic data is encrypted using the symmetric key and the lightweight AES algorithm to obtain a ciphertext; The ciphertext, random number and metadata are packaged to obtain a data packet to be transmitted.
4. The Internet of Things secure transmission method based on data encryption according to claim 3 is characterized in that: The importance coefficient of the data packet to be transmitted in the Internet of Things is calculated, and the data packet to be transmitted is segmented to obtain multiple data packet fragments, including: Compare the relative importance of environmental data and environmental factors and construct a judgment matrix; Calculate the maximum eigenvalue and corresponding eigenvector of the judgment matrix, and normalize the eigenvector; According to the characteristic vector, the importance coefficient I of the transmitted data packet is calculated by the formula: I=w1T+w2H+w3F+w4S+w5t+w6l+w7w, wherein T, H, F, S, t, l, w are temperature data, humidity data, flow data, equipment status data, time data, location data and weather condition data respectively; w1, w2, w3, w4, w5, w6, w7 are the corresponding elements in the characteristic vector respectively; According to the transmission data packet size and importance coefficient, the formula is: Determine the number of segments N, where S C is the size of the transmitted data packet, S0 is the basic segmentation unit, To round up; The transmission data packet is segmented according to the segment number to obtain multiple data packet fragments.
5. The Internet of Things secure transmission method based on data encryption according to claim 4 is characterized in that: Calculate the transmission impact factor for each packet fragment, including: By formula: Calculate the transmission impact factor of each packet fragment, where P i is the transmission impact factor of the i-th data packet fragment, α1, α2, α3 and α4 are preset weight coefficients, I is the importance coefficient of the data packet to be transmitted, T i , H i 、F i , S i ,t i , l i 、w i They are respectively the temperature data, humidity data, human flow data, equipment status data, time data, location data and weather condition data in the i-th data packet segment.
6. The Internet of Things secure transmission method based on data encryption according to claim 5 is characterized in that: The transmission path of each packet fragment is determined according to the transmission attributes of each transmission path, including: The particle swarm size is determined according to the number of packet fragments and the number of transmission paths, wherein each particle represents a possible transmission path combination; Initialize the position x of each particle i is a randomly selected transmission path combination, and the velocity v of each particle is initialized i is a random vector; Update particle speed and position in real time; For each particle, the formula: Calculate its fitness f(x i ), where P j Transmission impact factor of packet segment j; The transmission path x selected for particle i ij Available bandwidth; The transmission path x selected for particle i ij Delays; The transmission path x selected for particle i ij The packet loss rate; λ is the weight coefficient for adjusting the impact of the packet loss rate; If the fitness value of the current particle is better than the fitness value of the historical optimal position, the historical optimal position of the particle is updated to p i,best =x i (t); If the fitness value of the current particle is better than the fitness value of the global optimal position, the global optimal position is updated to g best =x i (t), repeat the iteration until the stopping condition is met; Output the global optimal position g best The corresponding transmission path combination is used to obtain the optimal transmission path for each data packet fragment.
7. The Internet of Things secure transmission method based on data encryption according to claim 6 is characterized in that: According to the transmission impact factor of the data packet fragment and the transmission attribute of the transmission path to which it belongs, the transmission adjustment coefficient of each transmission path at the current moment is calculated, including: By formula: Calculate the transmission adjustment coefficient of each transmission path at the current moment to adjust the bandwidth allocation of each transmission path at the current moment; where β j is the transmission adjustment coefficient of transmission path j; α, ε, γ, δ are weight parameters respectively; P j Transmission impact factor of packet segment j; is the sum of the transmission priority coefficients of all packet fragments; B 总 is the sum of bandwidths of all transmission paths; T j The amount of data packet fragments transmitted on transmission path j at the current moment; B j The bandwidth of transmission path j; is the logarithmic term of the load factor on the transmission path j at the current moment; L j is the delay of transmission path j; max(L) is the maximum delay value among all transmission paths; R j Packet loss rate of transmission path j; J j Jitter of transmission path j.
8. An Internet of Things secure transmission system based on data encryption, characterized in that: include: A generation module is used to generate an initial key container using an edge computing server, register each sensor node in the Internet of Things with the edge computing server, and receive the initial key container; The acquisition module is used to collect environmental data through sensor nodes and combine it with environmental factors to obtain environmental characteristic data; The encryption module is used to enable the sensor node to generate a symmetric key and encrypt the environmental characteristic data to obtain a data packet to be transmitted; A partitioning module is used to calculate the importance coefficient of the data packet to be transmitted in the Internet of Things, and to segment the data packet to be transmitted to obtain multiple data packet fragments; A calculation module, used to calculate the transmission impact factor of each data packet fragment, and determine the transmission path of each data packet fragment according to the transmission attribute of each transmission path; An adjustment module, used to calculate a transmission adjustment coefficient of each transmission path at the current moment according to a transmission impact factor of a data packet segment and a transmission attribute of the transmission path to which it belongs; The transmission module is used to adjust the attribute of each transmission path at the current moment according to the transmission adjustment coefficient and transmit the data packet fragment.
9. A computing device, characterized in that include: one or more processors; one or more processors; A storage device, used for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program, which, when executed by a processor, implements the method according to any one of claims 1 to 7.
Citation Information
Cited By
Remote intelligent monitoring system for power distribution cabinet
CN118971382A
