A near-field encrypted communication method based on the Internet of Things
By performing authentication and key management on NFC terminal devices, data leakage and security issues in near field communication are solved, and the stability of the IoT platform and data transmission security are enhanced.
Patent Information
- Application Number
- CN202211713152.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-27
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2042-12-27
AI Technical Summary
Near field communication technology has data leakage and security issues in IoT applications, leading to leakage and tampering of personal privacy, affecting the stability of the entire IoT platform.
By authenticating the NFC terminal device connected to the preset communication area, establishing a communication link, and sending the key table and key seed to the legitimate device for encryption, using the key seed to divide and encrypt the data, using random numbers Share keys to increase key security.
It enhances the concealment of NFC communication, avoids data leakage, improves the stability of the IoT platform, and ensures the security of data transmission.
Smart Images

Figure CN116827525B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of near field communication, and in particular to a near field encrypted communication method based on the Internet of Things. Background Art
[0002] Near Field Communication (NFC) is a short-range high-frequency radio technology that operates at a frequency of 13.56MHz within a distance of 20 cm. Its transmission speeds are 106kbps, 212kbps and 424kbps. At present, NFC has become the ISO / IEC IS 18092 international standard, ECMA-340 standard and ETSI TS 102 190 standard. NFC near-field communication technology is the integration and evolution of contactless radio frequency identification (RFID) and interoperability technology. NFC-enabled devices can exchange data in active or passive mode. In passive mode, the device that starts NFC communication, also known as the NFC initiator (master device), provides a radio frequency field (RF-field) during the entire communication process. It can select one of the transmission speeds of 106kbps, 212kbps or 424kbps to send data to another device. The other device is called the NFC target device (slave device). It does not need to generate an RF field, but uses load modulation technology to transmit data back to the initiator at the same speed.
[0003] Due to the widespread application of near-field communication technology, a large number of data leakage cases have occurred. There is a great demand for NFC devices. Too many NFC devices will lead to security issues in data transmission. Leaked data will leak personal privacy, and tampered data will affect the operation of the entire Internet of Things.
[0004] In view of this, the present invention provides a near-field encrypted communication method based on the Internet of Things. Summary of the invention
[0005] The present invention provides a near-field encryption communication method based on the Internet of Things, which is used to enhance the concealment of NFC communication through a key table and a key seed, so that the operation of the Internet of Things platform becomes more stable and the risk of data leakage is avoided.
[0006] The present invention provides a near-field encrypted communication method based on the Internet of Things, comprising:
[0007] Step 1: Obtain all NFC terminal devices contained in the preset communication area, and authenticate each NFC terminal device respectively;
[0008] Step 2: Establish a communication link for the target NFC terminal device with a legitimate identity, and send a key table and a key seed to each target NFC terminal device through the communication link;
[0009] Step 3: Use the key table and key seed to encrypt each target NFC terminal device respectively.
[0010] In one practicable manner,
[0011] The process of authenticating each NFC terminal device includes:
[0012] Obtain device identification information corresponding to each NFC terminal device contained in the preset communication area;
[0013] Parse each device identification information to obtain the identity information of the corresponding NFC terminal device;
[0014] comparing each identity with the target identity;
[0015] If the comparison is successful, it is determined that the corresponding NFC terminal device identity authentication is successful.
[0016] In one practicable manner,
[0017] The process of establishing a communication link for a legitimate target NFC terminal device includes:
[0018] Acquire a number of communication nodes of the device corresponding to each of the target NFC terminal devices, and establish a corresponding node statistics list for each target NFC terminal device;
[0019] Acquire a communication network corresponding to the preset communication area;
[0020] Establishing a plurality of initial links for the corresponding target NFC terminal device based on the node statistical list, and connecting each initial link to the communication network to obtain a plurality of links to be inspected;
[0021] The transmission efficiency corresponding to each link to be inspected is detected, and the link to be inspected with the highest transmission efficiency is extracted as the communication link corresponding to the target NFC terminal device.
[0022] In one practicable manner,
[0023] The process of sending the key table and the key seed to each target NFC terminal device through the communication link includes:
[0024] Get the device attributes corresponding to each target NFC terminal device;
[0025] Parsing the device attributes to obtain the communication mode of the corresponding target NFC terminal device;
[0026] Query the key table and key seed corresponding to each communication method in the preset communication method-key information corresponding list to establish a corresponding relationship;
[0027] Based on the corresponding relationship, the key table and the key seed are transmitted to the corresponding target NFC terminal device through the communication link for storage.
[0028] In one practicable manner,
[0029] The process of using the key table and the key seed to encrypt each target NFC terminal device includes:
[0030] Obtaining the data to be encrypted generated by the target NFC terminal device;
[0031] Dividing the data to be encrypted into a plurality of sub-data segments using the key seed;
[0032] Parsing the data to be encrypted to obtain corresponding data meaning;
[0033] Analyze each sub-data segment in the same data to be encrypted respectively to obtain the corresponding sub-data meaning;
[0034] Analyze the ratio between the meaning of each sub-data and the meaning of the corresponding data to obtain the meaning weight corresponding to each sub-data segment;
[0035] The data volume corresponding to each sub-data segment is obtained respectively, and the corresponding weight of each sub-data segment is obtained;
[0036] Based on the significance weight and the proportion weight, analyzing the encryption level corresponding to each sub-data segment;
[0037] Searching the encryption key corresponding to each encryption level in the key table, and transmitting the encryption key to the corresponding sub-data segment;
[0038] Obtaining a key chain according to the position relationship of the encryption key on the data to be encrypted;
[0039] Matching a random number for the number to be encrypted based on the key table;
[0040] Using the random number to obtain a shared key on the Internet;
[0041] Performing mutual adaptation training on the shared key and the key chain to obtain an encryption method;
[0042] Encrypting the data to be encrypted using the encryption method to obtain encrypted data;
[0043] The encrypted data is transmitted to a designated terminal for display.
[0044] In one practicable manner,
[0045] The process of detecting the transmission efficiency corresponding to each link to be detected and extracting the link to be detected with the highest transmission efficiency as the communication link corresponding to the target NFC terminal device includes:
[0046] Obtain several links to be inspected corresponding to the same NFC terminal device, and establish a list of links to be inspected and NFC terminal devices;
[0047] Transmitting a preset inspection data packet to each link to be inspected respectively, and obtaining a transmission delay of each link to be inspected for transmitting the preset inspection data packet;
[0048] Based on the list of links to be inspected and NFC terminal devices and the transmission delay corresponding to each link to be inspected, the transmission efficiency of each link to be inspected in the same NKC device is obtained;
[0049] Extracting the link to be inspected with the highest transmission efficiency in the same NKC device as the communication link, the specific steps include:
[0050] Step A1: a preset number of inspection data packets are transmitted to each link to be inspected, and the preset inspection data packets are returned after transmission. The preset inspection data packets are also provided with the number of transmissions and the time of transmitting the preset inspection data packets. The transmission delay of each link to be inspected to transmit the preset inspection data packets is obtained by using formula (1):
[0051]
[0052] Wherein T(i) represents the transmission delay of the preset inspection data packet transmitted by the i-th link to be inspected; t i (a) represents the time when the a-th preset inspection data packet returned by the i-th link to be inspected is received; J(i) represents the number of times the preset inspection data packet transmitted by the i-th link to be inspected is sent; [t i_0 |J(i)=a] represents the time when the preset inspection data packet corresponding to the preset inspection data packet transmitted by the i-th link to be inspected is transmitted when the number of times the preset inspection data packet is sent is equal to a; n represents the total number of preset inspection data packets received back from the i-th link to be inspected;
[0053] Step A2: Extract the link to be inspected with the highest transmission efficiency in the same NKC device according to the list of links to be inspected and NFC terminal devices and the transmission delay corresponding to each link to be inspected using formula (2):
[0054] I M =argmin i∈I(NFC) [T(i)] (2)
[0055] Among them I M Represents the array of link numbers with the highest transmission efficiency in the same NKC device; I(NFC) represents the combination of the numbers of the links to be inspected corresponding to the same NKC device in the list of links to be inspected-NFC terminal devices to form a set; ∈ represents belonging; argmin i∈I(NFC) [T(i)] means that all i values with the minimum T(i) value are obtained when i∈I(NFC) and combined to form an array;
[0056] If there is only one element value in the array, the element value is recorded as I′, and the link to be checked with the highest transmission efficiency is the I′th link to be checked, which is used as the communication link;
[0057] If there is more than one element value in the array, continue with the calculation and judgment of step A3;
[0058] Step A3: If there is more than one link to be checked with the highest transmission efficiency, the optimal link to be checked is selected as the communication link according to the number of nodes in the link to be checked with the highest transmission efficiency using formula (3):
[0059]
[0060] Among them I M ' indicates that the optimal link to be checked is the Ith M ' link to be checked and use it as a communication link; M (k) represents array I M The kth element value in; H represents the array I M The total number of element values in ; It means that the values of k from 1 to H are substituted into the brackets to obtain all the k values that have the minimum value in the brackets and combined to form an array; Indicates that the array Substitute the element values in I into M {}Get its minimum value.
[0061] In one practicable manner,
[0062] When there is only one communication node in the target NFC terminal device, a communication link is established based on the communication node and the communication network.
[0063] In one practicable manner,
[0064] Before transmitting the encrypted data to a designated terminal for display, the method includes:
[0065] Obtaining identity authentication information of the designated terminal;
[0066] Parsing the identity authentication information to determine whether the designated terminal is legitimate;
[0067] If so, transmitting the encrypted data to a designated terminal for display;
[0068] If not, interrupt the data transmission.
[0069] Compared with the prior art, the present invention has the following beneficial effects:
[0070] In order to ensure the effective transmission of data, the NFC terminal devices connected to the preset communication area are first authenticated, and then a communication link is established for the target NFC device with a legitimate identity. The data generated by the NFC terminal device is encrypted using the preset key table and key seed. In this way, the concealment of NFC communication is enhanced by using a new encryption algorithm, making the operation of the IoT platform more stable and avoiding data leakage.
[0071] The server authenticates the identity through the Internet and the NFC terminal device, and then establishes a communication connection. The server sends the key table and key seed through the Internet, the terminal node encrypts the data, and the server forwards it to the client. The key seed enables the terminal node and the server to have the same key table, and the random number coordinate method is used to share the key to improve the security of the key.
[0072] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0074] Figure 1 The figure is a schematic diagram of the working process of a near-field encrypted communication method based on the Internet of Things in an embodiment of the present invention. DETAILED DESCRIPTION
[0075] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0076] Example 1
[0077] A near-field encrypted communication method based on the Internet of Things, such as Figure 1 As shown, including:
[0078] Step 1: Obtain all NFC terminal devices contained in the preset communication area, and authenticate each NFC terminal device respectively;
[0079] Step 2: Establish a communication link for the target NFC terminal device with a legitimate identity, and send a key table and a key seed to each target NFC terminal device through the communication link;
[0080] Step 3: Use the key table and key seed to encrypt each target NFC terminal device respectively.
[0081] In this example, the preset communication area represents an area where data encryption work is performed;
[0082] In this example, the NFC terminal device can be: a mobile phone, a smart watch, a magnetic card, etc.;
[0083] In this example, the key table represents a list containing several keys;
[0084] In this example, the key seed represents a means of dividing data when performing encryption, and its function is to divide the data into multiple data segments, and then facilitate the subsequent encryption of each data segment.
[0085] The working principle and beneficial effects of the above technical solution are as follows: In order to ensure the effective transmission of data, the identity of the NFC terminal device connected to the preset communication area is first authenticated, and then a communication link is established for the target NFC device with a legitimate identity, and the data generated by the NFC terminal device is encrypted using the preset key table and key seed. In this way, the confidentiality of NFC communication is enhanced by using a new encryption algorithm, making the operation of the Internet of Things platform more stable and avoiding data leakage.
[0086] Example 2
[0087] On the basis of Example 1, the near-field encryption communication method based on the Internet of Things, the process of authenticating the identity of each NFC terminal device, includes:
[0088] Obtain device identification information corresponding to each NFC terminal device contained in the preset communication area;
[0089] Parse each device identification information to obtain the identity information of the corresponding NFC terminal device;
[0090] comparing each identity with the target identity;
[0091] If the comparison is successful, it is determined that the corresponding NFC terminal device identity authentication is successful.
[0092] In this example, the device identification information indicates information used to distinguish different NFC terminal devices;
[0093] In this example, the identity information represents device information of an NFC terminal device;
[0094] In this example, the target identity information represents the identity information corresponding to the NFC terminal device that meets the communication requirements of the preset communication area.
[0095] The working principle and beneficial effects of the above technical solution: In order to prevent irrelevant terminal devices from infecting the communication effect, the device identification information of each NFC terminal device in the preset communication area is obtained, the identity information of the corresponding NFC terminal device is obtained, and then the identity information is compared with the target identity information to obtain the comparison result, which serves as the basis for subsequent data encryption and data transmission.
[0096] Example 3
[0097] On the basis of Example 1, the near-field encryption communication method based on the Internet of Things, the process of establishing a communication link for a target NFC terminal device with a legitimate identity, includes:
[0098] Acquire a number of communication nodes of the device corresponding to each of the target NFC terminal devices, and establish a corresponding node statistics list for each target NFC terminal device;
[0099] Acquire a communication network corresponding to the preset communication area;
[0100] Establishing a plurality of initial links for the corresponding target NFC terminal device based on the node statistical list, and connecting each initial link to the communication network to obtain a plurality of links to be inspected;
[0101] The transmission efficiency corresponding to each link to be inspected is detected, and the link to be inspected with the highest transmission efficiency is extracted as the communication link corresponding to the target NFC terminal device.
[0102] In this example, a communication node refers to a node in an NFC terminal device that can establish a communication link, and the data of the communication node can be multiple;
[0103] In this example, the node statistics list represents a list of statistics of communication node data in an NFC terminal device, and may also represent a corresponding list of an NFC terminal device and its communication nodes;
[0104] In this example, the initial link refers to a link that is not connected to the communication network;
[0105] In this example, the link to be checked represents a link between the NFC terminal device and the communication network.
[0106] The working principle and beneficial effects of the above technical solution are as follows: In order to facilitate data transmission, the communication nodes contained in each target NFC terminal device are obtained, and then several links to be inspected are established using the communication nodes and the communication network. By analyzing the transmission efficiency of each link to be inspected, the link to be inspected with the highest transmission efficiency is finally used as the communication link. The generated communication link is the basis for the subsequent transmission of the key table, key seed, and data transmission.
[0107] Example 4
[0108] On the basis of Example 1, the near-field encryption communication method based on the Internet of Things, the process of sending a key table and a key seed to each target NFC terminal device through the communication link, includes:
[0109] Get the device attributes corresponding to each target NFC terminal device;
[0110] Parsing the device attributes to obtain the communication mode of the corresponding target NFC terminal device;
[0111] Query the key table and key seed corresponding to each communication method in the preset communication method-key information corresponding list to establish a corresponding relationship;
[0112] Based on the corresponding relationship, the key table and the key seed are transmitted to the corresponding target NFC terminal device through the communication link for storage.
[0113] In this example, the device attributes represent the attributes of the target NFC device when it is working;
[0114] In this example, the preset communication mode-key information correspondence list represents a correspondence list of different communication modes, key tables, and key seeds.
[0115] The working principle and beneficial effects of the above technical solution: In order to effectively encrypt data, first obtain the device attributes of each target NFC terminal device, obtain the communication mode of the target NFC terminal device, and then match the key table and key seed for it, and transmit them to the target NFC terminal device, which is the first step in data encryption.
[0116] Example 5
[0117] On the basis of Example 1, the near field encryption communication method based on the Internet of Things, using the key table and the key seed to encrypt each target NFC terminal device respectively, includes:
[0118] Obtaining the data to be encrypted generated by the target NFC terminal device;
[0119] Dividing the data to be encrypted into a plurality of sub-data segments using the key seed;
[0120] Parsing the data to be encrypted to obtain corresponding data meaning;
[0121] Analyze each sub-data segment in the same data to be encrypted respectively to obtain the corresponding sub-data meaning;
[0122] Analyze the ratio between the meaning of each sub-data and the meaning of the corresponding data to obtain the meaning weight corresponding to each sub-data segment;
[0123] The data volume corresponding to each sub-data segment is obtained respectively, and the corresponding weight of each sub-data segment is obtained;
[0124] Based on the significance weight and the proportion weight, analyzing the encryption level corresponding to each sub-data segment;
[0125] Searching the encryption key corresponding to each encryption level in the key table, and transmitting the encryption key to the corresponding sub-data segment;
[0126] Obtaining a key chain according to the position relationship of the encryption key on the data to be encrypted;
[0127] Matching a random number for the number to be encrypted based on the key table;
[0128] Using the random number to obtain a shared key on the Internet;
[0129] Performing mutual adaptation training on the shared key and the key chain to obtain an encryption method;
[0130] Encrypting the data to be encrypted using the encryption method to obtain encrypted data;
[0131] The encrypted data is transmitted to a designated terminal for display.
[0132] In this example, the data to be encrypted represents data generated by the target NFC terminal device, which needs to be encrypted and then transmitted to the designated terminal;
[0133] In this example, the sub-data segment represents the result of dividing the data to be encrypted into several segments;
[0134] In this example, the data meaning indicates the meaning corresponding to the data to be encrypted after being converted into text information;
[0135] In this example, the sub-data meaning represents the meaning corresponding to the sub-data segment after it is converted into text information;
[0136] In this example, the significance weight indicates the importance of the sub-data segment in the corresponding data to be encrypted;
[0137] In this example, the proportion weight indicates the degree to which the sub-data segment occupies the data volume in the corresponding data to be encrypted;
[0138] In this example, the encryption level may be one of: primary encryption, secondary encryption, tertiary encryption, and multiple encryption;
[0139] In this example, the encryption key represents a means by which the sub-data segment can be encrypted to a corresponding encryption level;
[0140] In this example, a key chain represents an arrangement of several encryption keys;
[0141] In this example, the random number is a number in [0, ∞);
[0142] In this example, the shared key refers to a key in the Internet.
[0143] The working principle and beneficial effects of the above technical solution are as follows: in order to encrypt the data to be encrypted, the data to be encrypted is first divided into several sub-data segments using a key seed, and then the sub-data meaning of each sub-data segment is analyzed to obtain its meaning weight in the data to be encrypted, and the encryption level of each sub-data segment is obtained in combination with the proportion weight of each sub-data segment, and then the corresponding encryption key is found to generate a key chain, and then a shared key is obtained on the Internet, and mutual adaptation training is performed with it to obtain the encryption method of the data to be encrypted, and then encryption is performed to obtain encrypted data, completing the data encryption work, encrypting each sub-data segment separately, realizing multi-code encryption, and improving the encryption effect.
[0144] Example 6
[0145] On the basis of Example 3, the near-field encrypted communication method based on the Internet of Things detects the transmission efficiency corresponding to each link to be inspected, and extracts the link to be inspected with the highest transmission efficiency as the communication link corresponding to the target NFC terminal device, including:
[0146] Obtain several links to be inspected corresponding to the same NFC terminal device, and establish a list of links to be inspected and NFC terminal devices;
[0147] Transmitting a preset inspection data packet to each link to be inspected respectively, and obtaining a transmission delay of each link to be inspected for transmitting the preset inspection data packet;
[0148] Based on the list of links to be inspected and NFC terminal devices and the transmission delay corresponding to each link to be inspected, the transmission efficiency of each link to be inspected in the same NKC device is obtained;
[0149] Extracting the link to be inspected with the highest transmission efficiency in the same NKC device as the communication link, the specific steps include:
[0150] Step A1: a preset number of inspection data packets are transmitted to each link to be inspected, and the preset inspection data packets are returned after transmission. The preset inspection data packets are also provided with the number of transmissions and the time of transmitting the preset inspection data packets. The transmission delay of each link to be inspected to transmit the preset inspection data packets is obtained by using formula (1):
[0151]
[0152] Wherein T(i) represents the transmission delay of the preset inspection data packet transmitted by the i-th link to be inspected; t i (a) represents the time when the a-th preset inspection data packet returned by the i-th link to be inspected is received; J(i) represents the number of times the preset inspection data packet transmitted by the i-th link to be inspected is sent; [t i_0 ||J(i)=a] represents the time when the preset inspection data packet corresponding to the preset inspection data packet transmitted by the i-th link to be inspected is transmitted when the number of times the preset inspection data packet is sent is equal to a; n represents the total number of preset inspection data packets received back from the i-th link to be inspected;
[0153] Step A2: Extract the link to be inspected with the highest transmission efficiency in the same NKC device according to the list of links to be inspected and NFC terminal devices and the transmission delay corresponding to each link to be inspected using formula (2):
[0154] I M =argmin i∈I(NFC) [T(i)] (2)
[0155] Among them I M Represents the array of link numbers with the highest transmission efficiency in the same NKC device; I(NFC) represents the combination of the numbers of the links to be inspected corresponding to the same NKC device in the list of links to be inspected-NFC terminal devices to form a set; ∈ represents belonging; argmin i∈I(NFC) [T(i)] means that all i values with the minimum T(i) value are obtained when i∈I(NFC) and combined to form an array;
[0156] If there is only one element value in the array, the element value is recorded as I′, and the link to be checked with the highest transmission efficiency is the I′th link to be checked, which is used as the communication link;
[0157] If there is more than one element value in the array, continue with the calculation and judgment of step A3;
[0158] Step A3: If there is more than one link to be checked with the highest transmission efficiency, the optimal link to be checked is selected as the communication link according to the number of nodes in the link to be checked with the highest transmission efficiency using formula (3):
[0159]
[0160] Among them I M ' indicates that the optimal link to be checked is the Ith M ' link to be checked and use it as a communication link; M (k) represents array I M The kth element value in; H represents the array I M The total number of element values in ; It means that the values of k from 1 to H are substituted into the brackets to obtain all the k values that have the minimum value in the brackets and combined to form an array; Indicates that the array Substitute the element values in I into M {}Get its minimum value.
[0161] In this example, the list of links to be inspected and NFC terminal devices corresponding to each other indicates the corresponding relationship between NFC terminal devices and links to be inspected;
[0162] In this example, the transmission delay represents the lag time when the link to be inspected transmits a preset inspection data packet;
[0163] In this example, the preset verification data packet represents initial data used to verify transmission efficiency.
[0164] The working principle and beneficial effects of the above technical solution are as follows: in order to obtain the communication link of the target NFC terminal device, a preset inspection data packet is transmitted by using the link to be inspected, and the transmission delay of each link to be inspected is recorded during the transmission process, and then the transmission efficiency of the link is analyzed, and finally the link to be inspected with the highest transmission efficiency can be extracted and used as the communication link. Specifically, the formula (1) of step A1 is used to obtain the transmission delay of each link to be inspected to transmit the preset inspection data packet, so as to intelligently analyze each link, reflecting the intelligence of the system; then, the formula (2) of step A2 is used to extract the link to be inspected with the highest transmission efficiency in the same NKC device according to the corresponding list of the link to be inspected-NFC terminal device and the transmission delay corresponding to each link to be inspected, and then the optimal link is selected as the communication link to improve the transmission efficiency of the system; finally, the formula (3) of step A3 is used to select the optimal link to be inspected as the communication link according to the number of nodes in the link to be inspected with the highest transmission efficiency, so as to select a link with fewer nodes from the links with multiple transmission efficiencies, thereby preventing the problem of increased probability of damage caused by too many nodes.
[0165] Example 7
[0166] On the basis of Example 3, the near-field encrypted communication method based on the Internet of Things is characterized by:
[0167] When there is only one communication node in the target NFC terminal device, a communication link is established based on the communication node and the communication network.
[0168] The working principle and beneficial effects of the above technical solution: In order to shorten the time of establishing a communication link, if the target NFC terminal device contains only one communication node, a communication link is directly established, which improves the efficiency of link generation to a certain extent.
[0169] Example 8
[0170] Based on Example 5, the near-field encrypted communication method based on the Internet of Things is characterized in that before transmitting the encrypted data to a designated terminal for display, it includes:
[0171] Obtaining identity authentication information of the designated terminal;
[0172] Parsing the identity authentication information to determine whether the designated terminal is legitimate;
[0173] If so, transmitting the encrypted data to a designated terminal for display;
[0174] If not, interrupt the data transmission.
[0175] The working principle and beneficial effects of the above technical solution are as follows: In order to ensure data security, the identity authentication information of the designated terminal is obtained before data transmission, and then it is determined whether it is legal, and data transmission is only performed when the designated terminal is legal, which improves transmission stability and ensures data security.
[0176] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A near-field encrypted communication method based on the Internet of Things, characterized in that: include: Step 1: Obtain all NFC terminal devices contained in the preset communication area, and authenticate each NFC terminal device respectively; Step 2: Establish a communication link for the target NFC terminal device with a legitimate identity, and send a key table and a key seed to each target NFC terminal device through the communication link; Step 3: Encrypt each target NFC terminal device using the key table and the key seed; The process of using the key table and the key seed to encrypt each target NFC terminal device includes: Obtaining the data to be encrypted generated by the target NFC terminal device; Dividing the data to be encrypted into a plurality of sub-data segments using the key seed; Parsing the data to be encrypted to obtain corresponding data meaning; Analyze each sub-data segment in the same data to be encrypted respectively to obtain the corresponding sub-data meaning; Analyze the ratio between the meaning of each sub-data and the meaning of the corresponding data to obtain the meaning weight corresponding to each sub-data segment; The data volume corresponding to each sub-data segment is obtained respectively, and the corresponding weight of each sub-data segment is obtained; Based on the significance weight and the proportion weight, analyzing the encryption level corresponding to each sub-data segment; Searching the encryption key corresponding to each encryption level in the key table, and transmitting the encryption key to the corresponding sub-data segment; Obtaining a key chain according to the position relationship of the encryption key on the data to be encrypted; Matching a random number for the number to be encrypted based on the key table; Using the random number to obtain a shared key on the Internet; Performing mutual adaptation training on the shared key and the key chain to obtain an encryption method; Encrypting the data to be encrypted using the encryption method to obtain encrypted data; The encrypted data is transmitted to a designated terminal for display.
2. A near-field encrypted communication method based on the Internet of Things as claimed in claim 1, characterized in that: The process of authenticating each NFC terminal device includes: Obtain device identification information corresponding to each NFC terminal device contained in the preset communication area; Parse each device identification information to obtain the identity information of the corresponding NFC terminal device; comparing each identity with the target identity; If the comparison is successful, it is determined that the corresponding NFC terminal device identity authentication is successful.
3. A near-field encrypted communication method based on the Internet of Things as claimed in claim 1, characterized in that: The process of establishing a communication link for a legitimate target NFC terminal device includes: Acquire a number of communication nodes corresponding to each of the target NFC terminal devices, and establish a corresponding node statistics list for each target NFC terminal device; Acquire a communication network corresponding to the preset communication area; Establishing a plurality of initial links for the corresponding target NFC terminal device based on the node statistical list, and connecting each initial link to the communication network to obtain a plurality of links to be inspected; The transmission efficiency corresponding to each link to be inspected is detected, and the link to be inspected with the highest transmission efficiency is extracted as the communication link corresponding to the target NFC terminal device.
4. A near-field encrypted communication method based on the Internet of Things as claimed in claim 1, characterized in that: The process of sending the key table and the key seed to each target NFC terminal device through the communication link includes: Get the device attributes corresponding to each target NFC terminal device; Parsing the device attributes to obtain the communication mode of the corresponding target NFC terminal device; Query the key table and key seed corresponding to each communication method in the preset communication method-key information corresponding list to establish a corresponding relationship; Based on the corresponding relationship, the key table and the key seed are transmitted to the corresponding target NFC terminal device through the communication link for storage.
5. A near-field encrypted communication method based on the Internet of Things as claimed in claim 3, characterized in that: The process of detecting the transmission efficiency corresponding to each link to be detected and extracting the link to be detected with the highest transmission efficiency as the communication link corresponding to the target NFC terminal device includes: Obtain several links to be inspected corresponding to the same NFC terminal device, and establish a list of links to be inspected and NFC terminal devices; Transmitting a preset inspection data packet to each link to be inspected respectively, and obtaining a transmission delay of each link to be inspected for transmitting the preset inspection data packet; Based on the list of links to be inspected and NFC terminal devices and the transmission delay corresponding to each link to be inspected, the transmission efficiency of each link to be inspected in the same NKC device is obtained; Extracting the link to be inspected with the highest transmission efficiency in the same NKC device as the communication link, the specific steps include: Step A1: a preset number of inspection data packets are transmitted to each link to be inspected, and the preset inspection data packets are returned after transmission. The preset inspection data packets are also provided with the number of transmissions and the time of transmitting the preset inspection data packets. The transmission delay of each link to be inspected to transmit the preset inspection data packets is obtained by using formula (1): Wherein T(i) represents the transmission delay of the preset inspection data packet transmitted by the i-th link to be inspected; t i (a) represents the time when the a-th preset inspection data packet returned by the i-th link to be inspected is received; J(i) represents the number of times the preset inspection data packet transmitted by the i-th link to be inspected is sent; [t i_0 |J(i)=a] represents the time when the preset inspection data packet corresponding to the preset inspection data packet transmitted by the i-th link to be inspected is transmitted when the number of times the preset inspection data packet is sent is equal to a; n represents the total number of preset inspection data packets received back from the i-th link to be inspected; Step A2: Extract the link to be inspected with the highest transmission efficiency in the same NKC device according to the list of links to be inspected and NFC terminal devices and the transmission delay corresponding to each link to be inspected using formula (2): I M =argmini ∈I(NFC) [T(i)] (2) Among them I M Represents the array of link numbers with the highest transmission efficiency in the same NKC device; I(NFC) represents the combination of the numbers of the links to be inspected corresponding to the same NKC device in the list of links to be inspected-NFC terminal devices to form a set; ∈ represents belonging; argmin i∈I(NFC) [T(i)] means that all i values with the minimum T(i) value are obtained when i∈I(NFC) and combined to form an array; If there is only one element value in the array, the element value is recorded as I′, and the link to be checked with the highest transmission efficiency is the I′th link to be checked, which is used as the communication link; If there is more than one element value in the array, continue with the calculation and judgment of step A3; Step A3: If there is more than one link to be checked with the highest transmission efficiency, the optimal link to be checked is selected as the communication link according to the number of nodes in the link to be checked with the highest transmission efficiency using formula (3): Among them I M ' indicates that the optimal link to be checked is the Ith M ' link to be checked and use it as a communication link; M (k) represents array I M The kth element value in; H represents the array I M The total number of element values in ; It means that the values of k from 1 to H are substituted into the brackets to obtain all the k values that have the minimum value in the brackets and combined to form an array; Indicates that the array Substitute the element values in I into M {}Get its minimum value.
6. A near-field encrypted communication method based on the Internet of Things as claimed in claim 3, characterized in that: When there is only one communication node in the target NFC terminal device, a communication link is established based on the communication node and the communication network.
7. A near-field encrypted communication method based on the Internet of Things as claimed in claim 1, characterized in that: Before transmitting the encrypted data to a designated terminal for display, the method includes: Obtaining identity authentication information of the designated terminal; Parsing the identity authentication information to determine whether the designated terminal is legitimate; If so, transmitting the encrypted data to a designated terminal for display; If not, interrupt the data transmission.
