Smart chair data transmission method based on encryption algorithm
Through the secret key transformation and verification of the client and server in the smart chair data transmission, the distribution characteristics of the seat data are used to generate a new version of the secret key, which solves the problem of leakage of the symmetric encryption algorithm secret key in the smart chair, reduces information security risks, and ensures ensure the security of data transmission.
Patent Information
- Application Number
- CN202410765555.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2044-06-14
AI Technical Summary
Due to the limited computing power of smart chairs during data transmission, the symmetric encryption algorithm keys used are easily leaked, leading to information security risks.
Through the initial key transformation between the client and the server, the distribution characteristics of the seat data are used to generate a new version of the key, and the consistency of the key is ensured through the first and second verifications to avoid the leakage of the key when sharing on the network.
It realizes the process of independently updating the secret key without occupying a large amount of computing resources, reduces the risk of secret key leakage, and ensures the security of information.
Smart Images

Figure CN118337538B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of data transmission, and in particular to a smart chair data transmission method based on an encryption algorithm. Background Art
[0002] Smart chairs use a variety of sensors such as pressure sensors and gyroscopes, as well as media devices and automatic control devices to interact with users and achieve functions such as sitting posture adjustment and body state detection. In this process, the devices on the smart chair communicate with each other through the Internet of Things. During the communication process, each device needs to encrypt the data to ensure the privacy of the data. Due to the limited computing power of each device, relatively fast symmetric encryption algorithms such as AES are usually used to encrypt the data. However, there are many devices communicating in the Internet of Things system built by the smart chair. For example, there are many smart seats in game halls and cinemas, and there are also many devices on smart seats. A large amount of different types of data participate in the interaction process between the smart chair and the user. It is inevitable that there are security vulnerabilities that lead to the leakage of secret keys. Even if the old secret keys that may be leaked are invalidated by updating the secret keys, the new secret keys after the update still need to be shared on the network, and there is still a risk of secret key leakage, which leads to the risk of information theft during data transmission and communication of smart chairs. Summary of the invention
[0003] In order to solve the problem that the secret key of the symmetric encryption algorithm may be leaked without occupying too many computing resources of the smart chair, the present invention provides a smart chair data transmission method based on the encryption algorithm.
[0004] The smart chair data transmission method based on encryption algorithm of the present invention adopts the following technical scheme:
[0005] One embodiment of the present invention provides a smart chair data transmission method based on an encryption algorithm, the method comprising the following steps:
[0006] The data of several seats before and after the target time are encrypted and decrypted using the initial secret key of the client and the server during transmission, so as to obtain the seat data of the client before and after the target time and the seat data of the server before and after the target time;
[0007] After obtaining the seat data of the client and the server before the target time, the distribution of the seat data of the client before the target time in the historical seat data of the client is recorded as the client feature, and the distribution of the seat data of the server before the target time in the historical seat data of the server is recorded as the server feature;
[0008] Using the client characteristics and server characteristics, the initial secret keys of the client and server are transformed to obtain new secret keys of the client and server;
[0009] The seat data at the target time is encrypted using the new version of the secret key on the client side, the encrypted data is decrypted using the new version of the secret key on the server side, and the new version of the secret key on the server side is initially verified based on the distribution of the decrypted seat data DATA2 in the historical seat data on the server side;
[0010] After obtaining the seat data of the client and the server after the target time, the new version of the server's secret key is verified for the second time according to the seat data of the server after the target time and the distribution of DATA2 in the historical seat data of the server;
[0011] When both the first and second verifications are passed, the initial key is replaced with the new key and the next encrypted communication is performed.
[0012] Preferably, the specific steps of acquiring the seat data of the client before and after the target time and the seat data of the server before and after the target time are as follows:
[0013] The seat data collected within a preset time period before the target time is recorded as the seat data of the client before the target time;
[0014] The seat data collected within a preset time period after the target time is recorded as the seat data of the client after the target time;
[0015] The seat data of the client before or after the target time is recorded as the data to be transmitted, and the data to be transmitted is encrypted using the AES algorithm. The encryption uses the initial secret key stored in the client, and the encrypted data to be transmitted is transmitted to the server;
[0016] The encrypted data to be transmitted is decrypted using the initial key stored on the server using the AES algorithm, and the decrypted data obtained is recorded as the seat data of the server before and after the target time.
[0017] Preferably, the initial secret key of the client and the initial secret key of the server are shared via a communication network and are stored on the client and the server respectively.
[0018] Preferably, the specific steps of obtaining the client characteristics and the server characteristics are as follows:
[0019] The seat data before the target time is recorded as Da; Da includes the seat data of the client and the server before the target time;
[0020] The historical seat data is denoted as D, where D includes the historical seat data of the client and the historical seat data of the server;
[0021] Perform density clustering on D to obtain several first categories; perform density clustering on Da and D together to obtain several second categories;
[0022] A distribution difference feature is obtained according to a difference between the second category and the first category, and the distribution difference feature includes a client feature and a server feature.
[0023] Preferably, the specific steps of obtaining the new version of the secret key of the client and the server are as follows:
[0024] According to the client characteristics and the server characteristics, the binary results of the initial secret keys of the client and the server are respectively shifted right to obtain new versions of the secret keys of the client and the server.
[0025] Preferably, the specific steps of the initial verification are as follows:
[0026] In the first category obtained by density clustering the historical seat data on the server side, obtain the first category c1 that is closest to DATA2, and record the vector pointing from DATA2 to the category center of the first category c1 as the initial verification feature; record the modulus length of the difference between the server-side feature and the initial verification feature as the verification result of the initial verification, and the initial verification is passed when the verification result of the initial verification is greater than the preset first threshold.
[0027] Preferably, the second verification includes the following specific steps:
[0028] Density clustering is performed on DATA2, the seat data of the server after the target time, and the historical seat data of the server to obtain several third categories. The third category d1 closest to DATA2 is obtained, and the vector pointing from DATA2 to the category center of the third category d1 is recorded as the second verification feature; the modulus length of the difference between the server feature and the second verification feature is recorded as the verification result of the second verification. When the verification result of the second verification is greater than the preset second threshold, the second verification is passed.
[0029] Preferably, the step of obtaining the distribution difference feature according to the difference between the second category and the first category comprises the following specific steps:
[0030] A pair of the second category a1 and the first category b1 with the smallest distance is obtained, and the vector from the category center of a1 to the category center of b1 is recorded as the distribution difference feature.
[0031] Preferably, the binary results of the initial secret keys of the client and the server are respectively shifted right according to the client characteristics and the server characteristics to obtain the new version of the secret keys of the client and the server, and the specific steps include the following:
[0032] Several interval ranges are divided, each interval range is preset with a positive integer, the interval ranges to which the client feature and the server feature belong are obtained respectively, and the positive integer corresponding to the interval range is used as the amount of right shift.
[0033] Preferably, when the client feature and the server feature do not exist in the corresponding interval range, the new version key is equal to the initial key.
[0034] The beneficial effects of the technical solution of the present invention are:
[0035] The present invention uses the client characteristics and the server characteristics to transform the initial secret key of the client and the server respectively to obtain the new version of the secret key of the client and the server; so that the client and the server can update the secret key independently, avoiding the risk of leakage of the secret key when sharing the network, and ensuring that the updated secret key is consistent. The present invention verifies the new version of the secret key of the server for the first time according to the distribution of the decrypted seat data DATA2 in the historical seat data of the server; and verifies the new version of the secret key of the server for the second time according to the seat data of the server after the target time and the distribution of DATA2 in the historical seat data of the server; when both the first and second verifications are passed, the initial secret key is replaced with the new version of the secret key and the next encrypted communication is performed. Whether the new version of the secret key of the client and the server is consistent is verified by the distribution change of the seat data before and after the key is updated, and the feasibility of the above-mentioned key update process is further ensured. In summary, the present invention updates and verifies the secret key through the big data part of the seat data. On the one hand, the update process is hidden in the distribution characteristics of the seat data. On the other hand, the risk of the secret key being leaked when sharing the network is avoided to a certain extent, and the information security of the smart seat during data transmission and communication is guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0037] Figure 1 A flowchart of a smart chair data transmission method based on an encryption algorithm provided by an embodiment of the present invention;
[0038] Figure 2 A system framework diagram of a smart chair data transmission system based on an encryption algorithm provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0039] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, features and effects of the smart chair data transmission method based on the encryption algorithm proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0040] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0041] In the present invention, the sensors, media devices, controllers and other devices on the smart chair that can generate data or receive data to achieve interaction are recorded as clients, and the computing units (such as single-chip microcomputers, processors, etc.) and storage devices that perform calculations and storage processing on the data are recorded as servers. The data generated by the client is encrypted and transmitted to the server using the Internet of Things system. The server decrypts the data and performs analysis and processing, such as filtering, interpolation, threshold judgment, feature extraction, data compression, etc. The specific processing method is determined by the operating business logic of the Internet of Things and is not described in detail here. Of course, the data processed by the server is also encrypted and transmitted to the client. The present invention only describes the example of data transmission from the client to the server, and the process of data transmission from the server to the client is the same.
[0042] The encryption algorithm used in the present invention is a symmetric encryption algorithm. Compared with an asymmetric encryption algorithm, a symmetric encryption algorithm occupies fewer computing resources and is suitable for situations where the computing power of the computing client is limited in the Internet of Things system of a smart chair. The symmetric encryption algorithm requires the secret key to be transmitted over the network to achieve secret key sharing between the client and the server, but the secret key is easily leaked during the transmission process. The present invention avoids or reduces the risk of secret key leakage as much as possible through the following method: during the communication process, the client and the server are allowed to independently update the secret key at certain moments, and when the client and the server do not share the secret key, the updated secret keys of both parties are guaranteed to be the same. The communication process at these moments does not involve network sharing of the secret key, so the risk of secret key leakage can be avoided to a certain extent.
[0043] The specific scheme of the smart chair data transmission method based on encryption algorithm provided by the present invention is described in detail below with reference to the accompanying drawings. Embodiment 1
[0044] See also Figure 1 , which shows a flowchart of a method for transmitting data of a smart chair based on an encryption algorithm according to an embodiment of the present invention, the method comprising the following steps:
[0045] Step S001: Several seat data before and after the target time are encrypted and decrypted using the initial secret keys of the client and the server during transmission, to obtain the seat data of the client before and after the target time, and the seat data of the server before and after the target time.
[0046] The current time is recorded as the target time. Before the target time, the secret key of the client and the server is shared through the network, so the secret key stored in the client and the secret key stored in the server are the same. This same secret key is recorded as the initial secret key.
[0047] This embodiment updates the secret key at the target time, and ensures that the client and the server are updated separately, that is, each updates its own secret key. In order to ensure that the secret keys updated by the client and the server are still the same, on the one hand, a suitable update method is needed, and on the other hand, a verification method is also needed to verify whether the secret keys updated by each are the same.
[0048] In this embodiment, taking into account the large amount of data generated by the smart chair when interacting with the user, the key is updated and verified by mining the features in this data, so that the key update process is hidden in the big data generated by the smart chair, thereby improving the concealment of the key update process.
[0049] First, this embodiment needs to analyze the communication process before the target time in order to serve the subsequent key update and verification process. The specific method is:
[0050] The seat data collected within a preset time period before the target time is recorded as the seat data of the client before the target time;
[0051] The seat data of the client before the target time is recorded as the data to be transmitted, and the data to be transmitted is encrypted using a symmetric encryption algorithm. The encryption uses the initial secret key stored in the client, and the encrypted data to be transmitted is transmitted to the server;
[0052] The encrypted data to be transmitted is decrypted using the initial key stored on the server using a symmetric encryption algorithm, and the decrypted data obtained is recorded as the seat data of the server before the target time.
[0053] The symmetric encryption algorithm used in this embodiment is the AES algorithm. Other symmetric encryption algorithms may be used in other embodiments, such as the DES algorithm. The preset time period length in this embodiment is 2 minutes, and other values may be set in other embodiments, which are not specifically limited in this embodiment.
[0054] Since the communication process at the target time has not started yet, the key update and verification process involved in the communication process at the target time needs to use the communication process after the target time. Therefore, the relevant data processing method after the target time is given in advance, and the relevant data processing method here can be used in the subsequent communication process after the target time. The relevant data processing method after the target time is specifically:
[0055] The seat data collected within a preset time period after the target time is recorded as the seat data of the client after the target time;
[0056] The seat data of the client after the target time is recorded as the data to be transmitted, and the data to be transmitted is encrypted using a symmetric encryption algorithm. The encryption uses the initial secret key stored in the client, and the encrypted data to be transmitted is transmitted to the server;
[0057] The encrypted data to be transmitted is decrypted using the initial key stored on the server using a symmetric encryption algorithm, and the decrypted data obtained is recorded as the seat data of the server after the target time.
[0058] Step S002, after obtaining the seat data of the client and the server before the target time, the distribution of the seat data of the client before the target time in the historical seat data of the client is recorded as the client feature, and the distribution of the seat data of the server before the target time in the historical seat data of the server is recorded as the server feature.
[0059] The purpose of this embodiment is to let the server and the client update their initial keys at the target time, rather than changing the keys by transmitting the keys over the network, so as to reduce the risk of key leakage. In order to keep the keys updated by the server and the client consistent, this embodiment uses the distribution of the seat data of the client and the server before the target time in the historical seat data of the client and the historical seat data of the server to update the initial key, hiding the initial key update process in the big data generated by the smart chair, thereby improving the concealment of the key update process.
[0060] Before the initial secret key update, the distribution of the client's seat data before the target time in the client's historical seat data is first recorded as the client feature, and the distribution of the server's seat data before the target time in the server's historical seat data is recorded as the server feature.
[0061] It should be noted that the method for obtaining the client's historical seat data is to randomly sample some seat data from the entire use process of the smart chair as the client's historical seat data, and store them in the client database; similarly, the method for obtaining the server's historical seat data is to randomly sample some seat data received by the server from the entire use process of the smart chair as the server's historical seat data, and store them in the server database.
[0062] Step S003: using the client characteristics and the server characteristics, respectively transform the initial secret keys of the client and the server to obtain new secret keys of the client and the server.
[0063] Although the client's historical seat data and the server's historical seat data are obtained independently on the server and the client respectively, the two are not necessarily the same. However, among a large amount of seat data, the client's historical seat data and the server's historical seat data still have data distribution features with a certain high similarity. The client features and server features in this embodiment are two data distribution features with a high similarity. Therefore, this embodiment uses the client features and server features to transform and update the initial key, so that the updated key remains consistent.
[0064] As an example, the initial secret keys of the client and the server are respectively transformed using the client characteristics and the server characteristics to obtain new versions of the secret keys of the client and the server, including the following methods:
[0065] According to the client characteristics and the server characteristics, the binary results of the initial secret keys of the client and the server are respectively shifted right to obtain new versions of the secret keys of the client and the server.
[0066] Step S004: Use the client's new version key to encrypt the seat data at the target time, use the server's new version key to decrypt the encrypted data, and perform initial verification on the server's new version key based on the distribution of the decrypted seat data DATA2 in the server's historical seat data.
[0067] At the target moment, the seat data DATA1 at the target moment is encrypted using the client's new version of the secret key. It should be noted that when the target moment is encrypted using the client's new version of the secret key, the client needs to send a message to tell the server to use the server's new version of the secret key for decryption at the target moment.
[0068] The encrypted DATA1 is transmitted to the server, and the DATA2 obtained by the server should be the same as DATA1. However, in practice, when the new version of the secret key is obtained through transformation and update, the client features and server features used are similar, but not completely the same (even very different). At this time, the new version of the secret key obtained by the client and the server is not the same, resulting in the fact that the actual DATA2 may be different from DATA1. Therefore, it is necessary to perform the initial verification of the new version of the secret key on the server.
[0069] Preferably, the specific process of the initial verification includes:
[0070] Obtain the distribution of DATA2 in the historical seat data on the server side, and perform initial verification based on the difference between the distribution and the server side characteristics.
[0071] When the new version of the server's secret key is different from the new version of the client's secret key, the distribution of DATA2 in the server's historical seat data will change significantly, that is, the difference between the distribution and the server's characteristics will be relatively large, and the verification will fail. When the new version of the server's secret key is the same as the new version of the client's secret key, the distribution of DATA2 in the server's historical seat data will not change significantly, that is, the difference between the distribution and the server's characteristics will be relatively small, and the verification will pass.
[0072] Step S005: after obtaining the seat data of the client and the server after the target time, perform a second verification on the new version of the server's secret key according to the seat data of the server after the target time and the distribution of DATA2 in the historical seat data of the server;
[0073] Taking into account that the above-mentioned initial key transformation update and initial verification are performed based on the distribution of the seat data at the target moment and before the target moment relative to the historical seat data, although this approach is acceptable from the perspective of big data statistics, there may still be accidental mutations in the data distribution pattern specifically for the communication process at the target moment. Therefore, after the initial verification, this embodiment merges DATA2 with the seat data of the server after the target moment, and performs a second verification on the historical seat data distribution of the server through the merged seat data.
[0074] Step S006: When both the first and second verifications are passed, the initial key is replaced with the new version of the key and the next encrypted communication is performed.
[0075] When both the first and second verifications are passed, it means that after the initial key is updated to the new version, the keys updated independently by the server and the client are still the same. At this time, the updated new version of the key is not shared on the network, at least there will be no key leakage caused by network sharing. Therefore, the subsequent communication can use the initial key to replace the new version of the key for the next encrypted communication.
[0076] When one of the first and second verifications fails, it means that the keys of the server and the client may be different after being independently updated. At this time, the initial key will still be used for the next encrypted communication; and the communication process at the target moment needs to be repeated, that is, after a preset time period after the target moment, the client seat data at the target moment is re-encrypted and transmitted using the initial key, and then decrypted again on the server using the initial key.
[0077] Although this process will cause a delay in the seat data at the target time, considering that the seat IoT system itself has the characteristics of high latency (for example, high latency caused by the exit of some clients and uneven performance of the client's communication equipment), the delay at the target time is acceptable compared to the effect of reducing key leakage.
[0078] It should also be noted that in other embodiments, the processing can further improve the credibility of the initial and second verifications by changing the length of the preset time period before and after the target moment in step S001. Embodiment 2
[0079] On the one hand, it is considered that in the first embodiment, the historical seat data of the client and the historical seat data of the server are directly stored in the local database of the client and the server through the data line. The advantage of this is that when communicating with the database, it does not go through the network but the data line, so as to avoid leaking the secret key during the communication with the database. The disadvantage is that, especially on the client side, each device of the client side needs to be connected to a data line to communicate with the local server of the client side, which results in additional hardware costs. On the other hand, it is considered that a special device for controlling the key update is needed to control the key update of the entire communication process.
[0080] Therefore, this embodiment provides a smart chair data transmission system based on an encryption algorithm, which includes: a client, a server, and a key update server, wherein the server and the client have a key update server each, and the two operate independently to avoid the situation where one is attacked and the other is implicated when the two are connected. The operation logic of the two is the same, and this embodiment is described by taking the key update server of the client as an example. The key update server includes a cloud database for storing historical seat data of the client and the server; it also includes a data processor, and the computer program in the data processor, on the one hand, runs the steps in the first embodiment to update the initial key to the new version of the key, and on the other hand, is used to control when the next key update starts.
[0081] Specific as Figure 2 As shown, considering that the cloud database is not a local database, the cloud database needs to store and read data through the network, and this process also involves encrypted transmission. If the historical seat data of the server and the client are transmitted to the cloud database for storage, the symmetric encryption algorithm is still used. At this time, there is still a risk of the secret key being leaked. Therefore, in this embodiment, an asymmetric encryption algorithm, such as the RSA algorithm, is used for encrypted transmission to avoid the risk of the secret key being leaked when it is shared through the network. At this time, although the RSA algorithm takes up more computing resources, considering that the historical seat data of the server and the client are collected, the server or the client does not need to encrypt and transmit the collected historical seat data to the cloud server through the asymmetric encryption algorithm every moment, but can be transmitted to the cloud server at intervals (for example, every 5 minutes) or randomly. Therefore, even if an asymmetric encryption algorithm is used, it will not take up too many computing resources when acquiring and storing historical seat data. It should be noted that since the seat data and historical seat data of the client and server before and after the target moment need to be analyzed together, the seat data before and after the target moment can also be transmitted to the cloud database and data processor in the key update server through random sampling and asymmetric encryption methods for storage and calculation.
[0082] In addition, after the initial key is updated to the new version of the key and passes the verification, after the new version of the key is used for a period of time thereafter, the initial key is replaced with the new version of the key for communication. In this embodiment, a target time is re-determined at a certain time interval TO, and then the key is updated again according to the method of embodiment one based on the target time. This allows the key to be updated all the time. This embodiment sets a target time to be re-determined every T0=8 minutes. Of course, a larger or smaller time interval can be set in other embodiments. The smaller the time interval is set, the more serious the delay phenomenon (the delay caused by the failure of verification) may be. The larger the time interval is set, the less obvious the delay phenomenon caused by the failure of verification.
[0083] like Figure 2 As shown, the key is updated every T0 time, where Figure 2 The new version of key 1 is obtained by transforming and updating the initial key, the new version of key 2 is obtained by transforming and updating the new version of key 1, and the new version of key 3 is obtained by transforming and updating the new version of key 2. Embodiment 3
[0084] In this embodiment, as a preferred example, the method for obtaining client features and server features includes:
[0085] The seat data before the target time is recorded as Da; Da includes the seat data of the client and the server before the target time;
[0086] The historical seat data is denoted as D, where D includes the historical seat data of the client and the historical seat data of the server;
[0087] Perform density clustering on D to obtain several first categories; perform density clustering on Da and D together to obtain several second categories;
[0088] A distribution difference feature is obtained according to a difference between the second category and the first category, and the distribution difference feature includes a client feature and a server feature.
[0089] In other embodiments, the density clustering algorithm may be replaced with other clustering algorithms, such as a mean shift clustering algorithm, an expectation maximum (EM) clustering algorithm using a Gaussian mixture model (GMM), and the like.
[0090] It should be noted that, considering that the types of seat data generated during the user's interaction with the smart chair are various, such as the timing sequence output by each sensor, the voice data output by the microphone, the touch screen in the media device outputs the user's touch data, etc. The seat data described in this embodiment refers to a certain type of seat data, such as the timing data output by the pressure sensor, and the communication process of different types of seat data is the same.
[0091] Since the seat data are all time-series during the communication process, but there may be no data transmission at some moments, the historical seat data of the server and the client, and the seat data of the server and the client before and after the target moment may not be of equal length or aligned in time sequence, but may contain missing values. In this embodiment, a linear interpolation algorithm is used to interpolate these seat data into time-series data of equal length to facilitate subsequent analysis and calculation. It should be noted that interpolation is not required when encrypting and transmitting the seat data, but only when analyzing and calculating the data, such as calculating the client features and the server features.
[0092] As a preferred example, the distribution difference feature is obtained according to the difference between the second category and the first category, including the specific method of:
[0093] The average value of all seat data in each second category or first category is taken as the category center of each second category or first category, and a pair of second category a1 and first category b1 with the smallest Euclidean distance between the category centers is obtained. The vector from the category center of a1 to the category center of b1 is recorded as the distribution difference feature.
[0094] As an optional example, the method for obtaining the client characteristics and the server characteristics also includes:
[0095] Perform PCA dimensionality reduction on D, for example, reduce the dimension to 4 dimensions, and obtain a number of first dimensionality reduction data; perform PCA dimensionality reduction on Da and D together, for example, reduce the dimension to 4 dimensions, and obtain a number of second dimensionality reduction data;
[0096] Obtaining distribution difference features according to the difference between the second dimensionality reduction data and the first dimensionality reduction data, wherein the distribution difference features include client features and server features;
[0097] As an example, the distribution difference feature is obtained according to the difference between the second dimension reduction data and the first dimension reduction data, including the specific method of:
[0098] The first dimension reduction center point is obtained by averaging all the first dimension reduction data, and the second dimension reduction center point is obtained by averaging all the second dimension reduction data. The vector from the second dimension reduction center point to the first dimension reduction center point is recorded as the distribution difference feature.
[0099] In this embodiment, as an example, the distribution of DATA2 in the historical seat data of the server is obtained, and the initial verification is performed according to the difference between the distribution and the server characteristics, including the following methods:
[0100] In the first category obtained by density clustering the historical seat data on the server side, obtain the category center that is closest to the Euclidean distance of DATA2. The first category corresponding to the category center is recorded as c1. The vector pointing from DATA2 to the category center of the first category c1 is recorded as the distribution of DATA2 in the historical seat data on the server side, which is abbreviated as the initial verification feature. The initial verification feature represents the distribution of DATA2 in the historical seat data on the server side.
[0101] The modulus length of the difference between the server feature and the initial verification feature is recorded as the verification result of the initial verification. When the verification result of the initial verification is greater than the first threshold th1, it indicates that the initial verification is passed, otherwise it fails.
[0102] In this embodiment, th1 is set to the average of the five smallest Euclidean distances in the second category a1. In other embodiments, it can be set to other values, which are not specifically limited in this embodiment.
[0103] In this embodiment, as an example, DATA2 is merged with the seat data of the server after the target time, and the merged seat data is used to perform a second verification on the historical seat data distribution of the server, including the following methods:
[0104] Density clustering is performed on DATA2, the seat data of the server after the target time, and the historical seat data of the server to obtain several third categories. In the third category, the category center with the closest Euclidean distance to DATA2 is obtained. The third category corresponding to the category center is recorded as d1. The vector pointing from DATA2 to the category center of the third category d1 is recorded as the second verification feature; the modulus length of the difference between the server feature and the second verification feature is recorded as the verification result of the second verification. When the verification result of the second verification is greater than the second threshold th2, the second verification passes, otherwise it fails. In this embodiment, th2=th1, and other values can be set in other embodiments, which are not specifically limited in this embodiment. Embodiment 4
[0105] As an example, in this embodiment, according to the client characteristics and the server characteristics, the binary results of the initial secret keys of the client and the server are respectively right-shifted to obtain the new version of the secret keys of the client and the server, including the following methods:
[0106] Divide the range into Q intervals, namely [0, v1], (v1, 2×v1], (2×v1, 3×v1], …, ((Q-1)×v1, Q×v1]. Each interval corresponds to a positive integer, namely 1, 2, 3, …, Q.
[0107] Get the interval range to which the client and server features belong, and use the positive integer corresponding to the interval range as the right shift amount.
[0108] In this embodiment, the interval range to which the client feature and the server feature belong is determined based on the module lengths of the client feature and the server feature.
[0109] It should be noted that, in this embodiment, the right shift is a circular right shift, that is, the binary number shifted from the rightmost end is automatically filled to the leftmost end.
[0110] When the client feature and the server feature do not belong to the same interval range, the right shift is 0, that is, the initial key is not updated or replaced. The reason is that the seat data of the client and the server have changed significantly compared to the historical seat data. At this time, the client features and the server features may not be similar, and there may even be a huge difference. It is difficult to ensure that the client and the server keep the same new version of the key when the initial key is updated without changing. Therefore, for the sake of safety, the initial key is not updated or replaced. At this time, the initial key can be used directly for communication without subsequent verification operations.
[0111] In other embodiments, Q and v1 may be set to fixed values, such as Q=128, V1=10; in this embodiment, the following method is used to obtain Q and v1:
[0112] Set Q to the number of bits in the initial secret key. Set v1 to the maximum Euclidean distance in the second category a1.
[0113] The above method updates the key by right-shifting the initial key. In other embodiments, other methods are used to update the key, for example, the initial key is encrypted with AES n times, and the encryption result is used as the new version of the key, where n is a positive integer corresponding to the interval range to which the client feature and the server feature belong. Although this method has stronger confidentiality, it has a large amount of calculation.
[0114] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A smart chair data transmission method based on encryption algorithm, characterized in that: The method comprises the following steps: The data of several seats before and after the target time are encrypted and decrypted using the initial secret key of the client and the server during transmission, so as to obtain the seat data of the client before and after the target time and the seat data of the server before and after the target time; After obtaining the seat data of the client and the server before the target time, the distribution of the seat data of the client before the target time in the historical seat data of the client is recorded as the client feature, and the distribution of the seat data of the server before the target time in the historical seat data of the server is recorded as the server feature; Using the client characteristics and server characteristics, the initial secret keys of the client and server are transformed to obtain new secret keys of the client and server; The seat data at the target time is encrypted using the new version of the secret key on the client side, the encrypted data is decrypted using the new version of the secret key on the server side, and the new version of the secret key on the server side is initially verified based on the distribution of the decrypted seat data DATA2 in the historical seat data on the server side; After obtaining the seat data of the client and the server after the target time, the new version of the server's secret key is verified for the second time according to the seat data of the server after the target time and the distribution of DATA2 in the historical seat data of the server; When both the first and second verifications are passed, the initial key is replaced with the new key and the next encrypted communication is performed; The specific steps of acquiring the client feature and the server feature are as follows: record the seat data before the target time as Da; Da includes the seat data of the client and the server before the target time; record the historical seat data as D, D includes the historical seat data of the client and the historical seat data of the server; perform density clustering on D to obtain a number of first categories; perform density clustering on Da and D together to obtain a number of second categories; obtain distribution difference features according to the difference between the second category and the first category, and the distribution difference features include the client feature and the server feature; The specific steps of the initial verification are as follows: in the first category obtained by density clustering the historical seat data on the server side, obtain the first category c1 that is closest to DATA2, and record the vector that points from DATA2 to the category center of the first category c1 as the initial verification feature; record the modulus length of the difference between the server-side feature and the initial verification feature as the verification result of the initial verification, and the initial verification is passed when the verification result of the initial verification is greater than the preset first threshold; Among them, the specific steps of the second verification are: density clustering DATA2, the seat data of the server after the target time and the historical seat data of the server to obtain several third categories, obtain the third category d1 closest to DATA2, and record the vector pointing from DATA2 to the category center of the third category d1 as the second verification feature; record the modulus length of the difference between the server feature and the second verification feature as the verification result of the second verification, and the second verification passes when the verification result of the second verification is greater than the preset second threshold.
2. According to the encryption algorithm-based smart chair data transmission method of claim 1, it is characterized in that: The specific steps of acquiring the seat data of the client before and after the target time and the seat data of the server before and after the target time are as follows: The seat data collected within a preset time period before the target time is recorded as the seat data of the client before the target time; The seat data collected within a preset time period after the target time is recorded as the seat data of the client after the target time; The seat data of the client before or after the target time is recorded as the data to be transmitted, and the data to be transmitted is encrypted using the AES algorithm. The encryption uses the initial secret key stored in the client, and the encrypted data to be transmitted is transmitted to the server; The encrypted data to be transmitted is decrypted using the initial key stored on the server using the AES algorithm, and the decrypted data obtained is recorded as the seat data of the server before and after the target time.
3. The method for transmitting data of a smart chair based on an encryption algorithm according to any one of claims 1 or 2, characterized in that: The client's initial key and the server's initial key are shared through the communication network and stored on the client and server respectively.
4. According to claim 1, the method for transmitting data of a smart chair based on an encryption algorithm is characterized in that: The specific steps for obtaining the new version of the secret key of the client and server are as follows: According to the client characteristics and the server characteristics, the binary results of the initial secret keys of the client and the server are respectively shifted right to obtain new versions of the secret keys of the client and the server.
5. According to the encryption algorithm-based smart chair data transmission method of claim 1, it is characterized in that: The specific steps of obtaining the distribution difference feature according to the difference between the second category and the first category are as follows: A pair of the second category a1 and the first category b1 with the smallest distance is obtained, and the vector from the category center of a1 to the category center of b1 is recorded as the distribution difference feature.
6. The method for transmitting data of a smart chair based on an encryption algorithm according to claim 4, characterized in that: The binary results of the initial secret keys of the client and the server are respectively shifted right according to the client characteristics and the server characteristics to obtain the new version of the secret keys of the client and the server, and the specific steps include the following: Several interval ranges are divided, each interval range is preset with a positive integer, the interval ranges to which the client feature and the server feature belong are obtained respectively, and the positive integer corresponding to the interval range is used as the amount of right shift.
7. The method for transmitting data of a smart chair based on an encryption algorithm according to claim 6, characterized in that: When the client feature and the server feature do not exist in the corresponding interval range, the new version key is equal to the initial key.
