Data encryption transmission method, device and system and storage medium

By randomly selecting the server key information locally on the Internet of Things devices to encrypt the data, the problem of insufficient data transmission of PC IoT devices is solved, and higher security and privacy are achieved.

CN120415701APending Publication Date: 2025-08-01FIBOCOM TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510370232.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

In the prior art, the data transmission of PC IoT devices lacks efficient and accurate encryption methods, resulting in insufficient information security.

Method used

The secret key information of the Internet of Things device is used to randomly select the server locally to encrypt the reported data, and store the secret key information used next time locally to ensure that the encryption method of each cycle remains random.

Benefits of technology

It improves the security and privacy of data transmission between IoT devices and servers, and enhances information protection through periodic random encryption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120415701A_ABST
    Figure CN120415701A_ABST
Patent Text Reader

Abstract

The invention provides a data encryption transmission method, device and system, and a storage medium, and the method comprises the steps: obtaining first data to be reported by Internet of Things equipment in a first week; locally reading first secret key information randomly selected by the Internet of Things equipment and a server in a second period, the second period being a historical period before the first period; encrypting the first data by adopting the first secret key information to obtain first encrypted data; and reporting the first encrypted data to the server. According to the data transmission method and device, the technical problem of data insecurity caused by adoption of a fixed encryption mode in related technologies is solved, and the security and privacy of data transmission between the Internet of Things equipment and the server side are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network security technology, and in particular, to a method and device, system, and storage medium for encrypted transmission of data. Background Art

[0002] The Internet of Things (IoT) is a network that uses information carriers such as the Internet and traditional telecommunications networks to enable all ordinary objects with independent functions to achieve interconnection and interoperability through information sensing devices according to agreed protocols. The PC (computer host) Internet of Things is mainly an Internet of Things with PCs as device nodes, that is, the PC exchanges and communicates information through an information dissemination medium to achieve functions such as intelligent identification, positioning, tracking, and supervision.

[0003] In related technologies, devices such as the PC Internet of Things usually report their own information periodically, including device hardware information such as battery power, network parameters such as the International Mobile Equipment Identity (IMEI), and positioning information. Therefore, it is best to ensure the security of information transmission as much as possible, so that even if the data packet is intercepted, no useful information can be decoded.

[0004] In view of the above problems existing in related technologies, no efficient and accurate solution has been found yet. Summary of the Invention

[0005] The present invention provides a method and device, system, and storage medium for encrypted transmission of data to solve the above technical problems existing in related technologies.

[0006] According to an embodiment of the present invention, a method for encrypted transmission of data is provided, including: obtaining first data to be reported by an Internet of Things device in a first period; locally reading first secret key information randomly selected by the Internet of Things device and a server in a second period, where the second period is a historical period before the first period; encrypting the first data using the first secret key information to obtain first encrypted data; and reporting the first encrypted data to the server.

[0007] Optionally, obtaining first data to be reported by an Internet of Things device in a first period includes: obtaining first device information to be reported by the Internet of Things device in the first period; randomly selecting second secret key information to be used between the Internet of Things device and the server in a third period, where the third period is a future period after the first period; and generating the first data to be reported by the Internet of Things device in the first period by packing the first device information and the second secret key information.

[0008] Optionally, randomly selecting the second key information to be used between the IoT device and the server in the third period includes: randomly selecting an encryption algorithm to be used between the IoT device and the server in the third period; generating key data for the encryption algorithm; determining the encryption algorithm and the key data as the second key information to be used between the IoT device and the server in the third period, and locally storing the second key information in the IoT device.

[0009] Optionally, randomly selecting the encryption algorithm to be used between the IoT device and the server in the third period includes: selecting a target encryption algorithm from an encryption algorithm library using a first random algorithm, where the encryption algorithm library includes a number of symmetric encryption algorithms and a number of asymmetric encryption algorithms; generating a target usage time for the target encryption algorithm using a second random algorithm; determining the target encryption algorithm as the encryption algorithm to be used between the IoT device and the server in the third period, where the duration of the third period is the target usage time.

[0010] Optionally, before obtaining the first data to be reported by the IoT device in the first period, the method further includes: after activating the IoT device, obtaining initial device information to be reported by the IoT device in an initial period; obtaining preset initial key information, and randomly selecting third key information to be used between the IoT device and the server in a fourth period, where the fourth period is the next period after the initial period; encrypting the initial device information and the third key information using the initial key information to obtain initial encrypted data; reporting the initial encrypted data to the server.

[0011] Optionally, after reporting the first encrypted data to the server, the method further includes: receiving a retransmission request sent by the server for the first encrypted data; responding to the retransmission request, obtaining preset initial key information, and randomly selecting second key information to be used between the IoT device and the server in a third period, where the third period is a future period after the first period; encrypting the first data and the second key information using the initial key information to obtain second encrypted data; reporting the second encrypted data to the server.

[0012] According to another embodiment of the present invention, there is provided a data encryption transmission device, including: a first acquisition module, configured to acquire first data to be reported by an Internet of Things device in a first period; a reading module, configured to locally read first secret key information randomly selected by the Internet of Things device and a server in a second period, where the second period is a historical period before the first period; a first encryption module, configured to encrypt the first data by using the first secret key information to obtain first encrypted data; and a first reporting module, configured to report the first encrypted data to the server.

[0013] Optionally, the first acquisition module includes: an acquisition unit, configured to acquire first device information to be reported by the Internet of Things device in a first period; a selection unit, configured to randomly select second secret key information to be used between the Internet of Things device and the server in a third period, where the third period is a future period after the first period; and a generation unit, configured to package and generate the first data to be reported by the Internet of Things device in the first period by using the first device information and the second secret key information.

[0014] Optionally, the selection unit includes: a selection subunit, configured to randomly select an encryption algorithm to be used between the Internet of Things device and the server in a third period; a generation subunit, configured to generate secret key data of the encryption algorithm; and a determination subunit, configured to determine the encryption algorithm and the secret key data as the second secret key information to be used between the Internet of Things device and the server in the third period, and store the second secret key information locally in the Internet of Things device.

[0015] Optionally, the selection subunit is further configured to: select a target encryption algorithm from an encryption algorithm library by using a first random algorithm, where the encryption algorithm library includes a plurality of symmetric encryption algorithms and a plurality of asymmetric encryption algorithms; generate a target usage time of the target encryption algorithm by using a second random algorithm; and determine the target encryption algorithm as the encryption algorithm to be used between the Internet of Things device and the server in the third period, where the duration of the third period is the target usage time.

[0016] Optionally, the device further includes: a second acquisition module, configured to acquire initial device information to be reported by the Internet of Things device in an initial period after activating the Internet of Things device, before the first acquisition module acquires first data to be reported by the Internet of Things device in a first period; a processing module, configured to acquire preset initial key information and randomly select third key information to be used between the Internet of Things device and the server in a fourth period, where the fourth period is the next period of the initial period; a second encryption module, configured to encrypt the initial device information and the third key information by using the initial key information to obtain initial encrypted data; and a second reporting module, configured to report the initial encrypted data to the server.

[0017] Optionally, the device further includes: a receiving module, configured to receive a retransmission request sent by the server for the first encrypted data after the first reporting module reports the first encrypted data to the server; a third acquisition module, configured to respond to the retransmission request, acquire preset initial key information, and randomly select second key information to be used between the Internet of Things device and the server in a third period, where the third period is a future period after the first period; a third encryption module, configured to encrypt the first data and the second key information by using the initial key information to obtain second encrypted data; and a third reporting module, configured to report the second encrypted data to the server.

[0018] According to another embodiment of the present invention, there is also provided a data encryption and transmission system, including an electronic device and a server, where the electronic device is communicatively connected to the server. The electronic device includes a memory and a processor, and a computer program is stored in the memory. The processor is configured to run the computer program to execute the method in the above embodiment; the server is configured to receive the first encrypted data and decrypt the first encrypted data by using the first key information.

[0019] According to another embodiment of the present invention, there is also provided a storage medium, in which a computer program is stored, where the computer program is configured to execute the steps in the above embodiment when running.

[0020] Through the embodiments of the present invention, first data to be reported by an Internet of Things device in a first period is obtained; first secret key information randomly selected by the service end for the Internet of Things device in a second period is read locally, where the second period is a historical period before the first period; the first data is encrypted using the first secret key information to obtain first encrypted data; the first encrypted data is reported to the service end. When the Internet of Things device periodically reports data to the service end, the data for this time is encrypted using the secret key information randomly selected last time, so that the encryption method for each period also maintains randomness, solving the technical problem in the related art that using a fixed encryption method results in data insecurity, and improving the security and privacy of data transmission between the Internet of Things device and the service end. Description of the Drawings

[0021] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The illustrative embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation to the present invention. In the drawings:

[0022] Figure 1 is a hardware structure block diagram of a server according to an embodiment of the present invention;

[0023] Figure 2 is a flowchart of a method for encrypted transmission of data according to an embodiment of the present invention;

[0024] Figure 3 is a flowchart of encrypted data transmission between a device end and a server end in an embodiment of the present invention;

[0025] Figure 4 is a structure block diagram of a device for encrypted transmission of data according to an embodiment of the present invention. Detailed Embodiments

[0026] In order to enable those skilled in the art of this technology to better understand the solution of this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this application. It should be noted that, without conflict, the embodiments in this application and the features in the embodiments can be combined with each other.

[0027] It should be noted that the terms "first", "second", etc. in the description, claims and the above-mentioned drawings of this application are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, product or device that includes a series of steps or units does not necessarily limit to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0028] Embodiment 1

[0029] The method embodiment provided by the first embodiment of this application can be executed in an Internet of Things device, a communication module, a communication terminal or a similar computing device. Taking running on an Internet of Things device as an example, Figure 1 is a hardware structure block diagram of an Internet of Things device according to an embodiment of the present invention. As Figure 1 shown, the Internet of Things device may include one or more ( Figure 1 only one is shown in the figure) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the above-mentioned Internet of Things device may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 the structure shown is only schematic and does not limit the structure of the above-mentioned Internet of Things device. For example, the Internet of Things device may further include more or fewer components than Figure 1 shown in the figure, or have a different configuration from Figure 1 shown in the figure.

[0030] The memory 104 can be used to store Internet of Things device programs. For example, software programs and modules of application software, such as the Internet of Things device program corresponding to a data encryption transmission method in an embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the Internet of Things device program stored in the memory 104, that is, implements the above-mentioned method. The memory 104 may include a high-speed random access memory, and may further include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely set relative to the processor 102, and these remote memories can be connected to the Internet of Things device through a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.

[0031] The transmission device 106 is used to receive or send data via a network. Specific examples of the above network may include a wireless network provided by a communication provider of Internet of Things devices. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, abbreviated as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0032] In this embodiment, a method for encrypted transmission of data is provided. Figure 2 It is a flowchart of a method for encrypted transmission of data according to an embodiment of the present invention, as Figure 2 shown, and the process includes the following steps:

[0033] Step S202, obtaining first data to be reported by the Internet of Things device in a first period;

[0034] The Internet of Things device is communicatively connected to the server (server side) and periodically reports data to the server. Optionally, the Internet of Things device may be a module capable of implementing a communication function or a terminal device including the module, and the terminal device may be a mobile terminal or a smart terminal. The mobile terminal may be at least one of a mobile phone, a tablet computer, a laptop computer, etc.; the smart terminal may be a smart car, a smart watch, a shared bicycle, a smart cabinet, etc. containing a wireless communication module; the module may be a wireless communication module, such as any one of a 2G communication module, a 3G communication module, a 4G communication module, a 5G communication module, an NB-IOT communication module, etc.

[0035] Step S204, locally reading first secret key information randomly selected by the Internet of Things device and the server in a second period, where the second period is a historical period before the first period;

[0036] Optionally, the second period may be the previous period of the first period or the previous n (n>1) periods. When the Internet of Things device and the server communicate in the second period, they negotiate and agree to use the first secret key information to encrypt and transmit data in the future first period.

[0037] Step S206, encrypting the first data with the first secret key information to obtain first encrypted data;

[0038] Step S208, reporting the first encrypted data to the server.

[0039] Through the above steps, obtain the first data to be reported by the Internet of Things device in the first cycle; locally read the first secret key information randomly selected by the Internet of Things device and the server in the second cycle, where the second cycle is a historical cycle before the first cycle; use the first secret key information to encrypt the first data to obtain the first encrypted data; report the first encrypted data to the server. When the Internet of Things device periodically reports data to the server, it uses the previously randomly selected secret key information to encrypt the current data, making the encryption method for each cycle also random, solving the technical problem of data insecurity caused by using a fixed encryption method in the related art, and improving the security and privacy of data transmission between the Internet of Things device and the server.

[0040] In this embodiment, obtaining the first data to be reported by the Internet of Things device in the first cycle includes:

[0041] S11, obtain the first device information to be reported by the Internet of Things device in the first cycle;

[0042] Optionally, the device information reported by Internet of Things devices with different functions and in different scenarios to the server is different. The first device information may be device status information, device attribute information, log information, heartbeat packets, etc., such as device hardware information such as the battery level of the Internet of Things device, network parameters such as IMEI, and location information.

[0043] S12, randomly select the second secret key information to be used between the Internet of Things device and the server in the third cycle, where the third cycle is a future cycle after the first cycle;

[0044] Optionally, the third cycle may be the next cycle of the first cycle or the next m (m>1) cycles.

[0045] When the Internet of Things device reports data to the server in the current cycle, it randomly selects the second secret key information required next time, stores the second secret key information locally in the Internet of Things device, and encrypts and transmits it to the server for use when the Internet of Things device transmits data to the server next time, making the encryption method for each cycle random.

[0046] In an implementation manner of this embodiment, randomly selecting the second secret key information to be used between the Internet of Things device and the server in the third cycle includes: randomly selecting the encryption algorithm to be used between the Internet of Things device and the server in the third cycle; generating the key data of the encryption algorithm; determining the encryption algorithm and the key data as the second secret key information to be used between the Internet of Things device and the server in the third cycle, and storing the second secret key information locally in the Internet of Things device.

[0047] By sending the second key information to the server in advance and storing the second key information locally on the Internet of Things device, after the third cycle arrives, the Internet of Things device reads the second key information locally and uses the second key information to encrypt the data in the third cycle, so that each time the Internet of Things device reports data, it can be encrypted with random key information, improving the privacy and security of data transmission.

[0048] The encryption algorithm in this embodiment is a mathematical method for protecting information security. It converts readable plaintext data into ciphertext data that cannot be directly understood, and needs to be decrypted and restored to the original plaintext through the correct key data. Different types of encryption algorithms (symmetric encryption or asymmetric encryption) correspond to different key data.

[0049] The generation of the key data of the encryption algorithm is a key step to ensure encryption security. According to the type of encryption algorithm (symmetric encryption or asymmetric encryption), the way of key generation is different.

[0050] The symmetric encryption algorithm uses the same key for encryption and decryption, so the secure generation and management of the key are crucial. Key generation methods include random generation and key derivation:

[0051] Random generation: Use a secure random number generator (RNG) or a pseudo-random number generator (PRNG) to generate the key. For example, the key length of the AES algorithm can be 128 bits, 192 bits, or 256 bits. The randomly generated key should ensure unpredictability.

[0052] Password-based key derivation: Generate the key from the password entered by the user through a key derivation function (such as the PBKDF2, bcrypt, or scrypt function). It can be applied to scenarios where the user needs to remember the key.

[0053] The asymmetric encryption algorithm uses a pair of keys: the key data includes a public key and a private key. The public key can be made public, while the private key must be kept secret. For example, the key generation of the RSA encryption algorithm includes: The RSA algorithm is based on the difficult problem of large number factorization, and the key generation steps are as follows: Randomly select two large prime numbers p and q; calculate n = p * q and the Euler's totient function φ(n) = (p - 1) * (q - 1); select an integer e (usually 65537), satisfying 1 < e < φ(n) and gcd(e, φ(n)) = 1; calculate the private key d = e -1 mod φ(n). The key generation of the ECC (Elliptic Curve Cryptography) encryption algorithm includes: ECC is based on elliptic curve mathematics, and the key generation steps include: Select an elliptic curve and a base point G; randomly select a private key d; calculate the public key Q = d * G.

[0054] In one example, randomly selecting the encryption algorithm to be used between the Internet of Things device and the server in the third period includes: selecting a target encryption algorithm from an encryption algorithm library using a first random algorithm, where the encryption algorithm library includes several symmetric encryption algorithms and several asymmetric encryption algorithms; generating a target usage time for the target encryption algorithm using a second random algorithm; and determining the target encryption algorithm as the encryption algorithm to be used between the Internet of Things device and the server in the third period, where the duration of the third period is the target usage time.

[0055] Optionally, the target usage time can be a single period, such as the target encryption algorithm being used in the 3rd period after the current period, or multiple periods (the duration is an integer multiple of the duration of a single period). It can be the total duration of several consecutive periods, such as the 1st to the 3rd periods (a total of 3 periods) after the first period, or the total duration of discrete multiple periods, such as the 1st period and the 3rd period after the first period (a total of 2 periods). It can be randomly selected within a preset duration range.

[0056] The encryption method for the next report can be reserved for the server through the current report, or the "next" here can be extended to the next X times. In this way, the randomness of the overall encryption increases by one order of magnitude, making it more difficult to crack. Both communication ends need to store more reserved encryption algorithms and key information, and the specific quantity depends on the maximum value of X.

[0057] Optionally, the same key is used for encryption and decryption in the symmetric encryption algorithm. The advantages are fast encryption and decryption speeds, suitable for processing large amounts of data, but key distribution and management are relatively complex. Symmetric encryption algorithms can be: AES (Advanced Encryption Standard): The most widely used symmetric encryption algorithm currently, supporting key lengths of 128, 192, and 256 bits, with high security and high encryption efficiency. DES (Data Encryption Standard): An early symmetric encryption algorithm with a key length of 56 bits, including its improved version 3DES. RC4: A stream encryption algorithm widely used in the SSL / TLS (Secure Sockets Layer / Transport Layer Security) protocol. Blowfish: Supports variable-length keys, has a fast encryption speed, and is suitable for encrypting small amounts of data.

[0058] Asymmetric encryption algorithms use a pair of keys: a public key and a private key (stored on the server side). The public key is used to encrypt data, and the private key is used to decrypt data. The public key can be made public, while the private key must be kept secret. Its advantage is simple key distribution, but the encryption and decryption speeds are relatively slow. It is usually used for encrypting small amounts of data or key exchange. Asymmetric encryption algorithms can be: RSA: Based on the difficult problem of large integer factorization, widely used in fields such as SSL / TLS and digital signatures. ECC (Elliptic Curve Cryptography): Based on the mathematical theory of elliptic curves, with higher security and efficiency, suitable for mobile devices and Internet of Things scenarios. ElGamal: An encryption algorithm based on the discrete logarithm problem, similar to RSA but using different mathematical principles.

[0059] S13. Use the first device information and the second secret key information to package and generate the first data to be reported by the Internet of Things device in the first period.

[0060] In this embodiment, before obtaining the first data to be reported by the Internet of Things device in the first period, it further includes: after activating the Internet of Things device, obtaining the initial device information to be reported by the Internet of Things device in the initial period; obtaining the preset initial secret key information, and randomly selecting the third secret key information to be used between the Internet of Things device and the server in the fourth period, where the fourth period is the next period of the initial period; using the initial secret key information to encrypt the initial device information and the third secret key information to obtain initial encrypted data; reporting the initial encrypted data to the server.

[0061] The initial secret key information in this embodiment is configured during the initialization stage or at the factory of the Internet of Things device, and is jointly stored by the Internet of Things device and the server. The Internet of Things device can synchronize the initial secret key information to the server during the three-way handshake stage when establishing a connection with the server.

[0062] After the Internet of Things device is activated and prepares to report for the first time, it encrypts the data according to the encryption algorithm of the agreed initial secret key information, and at the same time randomly selects the encryption algorithm to be used for the next report, such as symmetric, asymmetric, hashing algorithms, etc.; encrypts and sends the algorithm and key data (the third secret key information) together with the current information data to the server, and saves the third secret key information locally on the Internet of Things device for use in the next report.

[0063] In an implementation scenario of this embodiment, after reporting the first encrypted data to the server, the following steps are further included: receiving a retransmission request sent by the server for the first encrypted data; in response to the retransmission request, obtaining preset initial key information and randomly selecting second key information to be used between the IoT device and the server in a third period, where the third period is a future period after the first period; encrypting the first data and the second key information using the initial key information to obtain second encrypted data; and reporting the second encrypted data to the server.

[0064] In the scenario of packet loss such as the server failing to receive the first encrypted data, the IoT device needs to retransmit data to the server. If no retransmission is performed, once packet loss occurs, due to the lack of the next key information, the next encrypted data cannot be decrypted, resulting in the inability to decrypt subsequent information. By adding an automatic or manual restart process, that is, determining packet loss, the above process can be restarted. The server can infer whether packet loss has occurred based on the reporting period and the timestamp of the information, and thus send a retransmission request to trigger the restart process.

[0065] An artificial manual restart process can also be added. For example, initializing the IoT device and encrypting data using the initial key information can ensure that an out-of-control situation does not occur.

[0066] The solution of this embodiment relies on the characteristic of periodic reporting of IoT devices such as PCs. Before each report, a random selection is made for the encryption method of the next report, and the handshake and interoperability of the encryption protocol are completed during periodic reporting, so that each report can be transmitted using a different encryption method, thereby further enhancing information privacy.

[0067] Figure 3 It is a flowchart of the encrypted data transmission between the device side and the server side in an embodiment of the present invention. Based on the original PC IoT information security technology, by utilizing its characteristic of periodic continuous reporting, encryption means are added, including the following steps:

[0068] After the device is activated and prepares to report for the first time, it encrypts the data according to the agreed encryption algorithm (initial key information). At the same time, it randomly selects the encryption algorithm to be used for the next report, such as symmetric, asymmetric, hash algorithms, etc.; encrypts and sends the algorithm and key information together with the current information data to the server side, and saves the algorithm locally for use in the next report.

[0069] When the device reports next time, it collects data as required, and at the same time randomly selects the encryption algorithm and other key information to be used for the next report, and encrypts and processes the collected information data together with the algorithm and its key information (or clues) according to the previously saved algorithm and sends it; at the same time, saves the algorithm information for use next time.

[0070] The reports sent from the back of the device can all be processed according to the previous step, and so on in cycles;

[0071] When the server side receives the information for the first time, it decrypts the information according to the agreed initial secret key information. Every time it receives the information later, it can decrypt the information according to the algorithm and key information provided in the information received last time, and so on in cycles;

[0072] Based on the above solution where the network transmission is completely reliable, once a packet loss occurs, the server side can infer whether a packet loss has occurred based on the reporting period and the timestamp of the information, thereby triggering a restart.

[0073] Based on a single encryption method, the solution of this embodiment further expands the encryption algorithm and randomness of information transmission, enabling multiple classic encryption algorithms to run randomly and orderly. The private information of users will be more secure and reliable, improving the security and user experience of Internet of Things devices.

[0074] Through the description of the above implementation manners, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation manner. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disc), and includes several instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present invention.

[0075] In this embodiment, a data encryption transmission device is further provided. This device is used to implement the above embodiments and preferred implementation manners, and those that have been described will not be repeated. As used hereinafter, the term "module" can be a combination of software and hardware that can implement a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also conceivable.

[0076] Figure 4 is a structural block diagram of a data encryption transmission device according to an embodiment of the present invention. As Figure 4 shown, the device includes:

[0077] A first acquisition module 40, configured to acquire first data to be reported by the Internet of Things device in a first period;

[0078] A reading module 42, configured to locally read first secret key information randomly selected by the Internet of Things device and the server side in a second period, where the second period is a historical period before the first period;

[0079] The first encryption module 44 is configured to encrypt the first data using the first secret key information to obtain first encrypted data;

[0080] The first reporting module 46 is configured to report the first encrypted data to the server.

[0081] Optionally, the first acquisition module includes: an acquisition unit configured to acquire first device information to be reported by the Internet of Things device in a first period; a selection unit configured to randomly select second secret key information to be used between the Internet of Things device and the server in a third period, where the third period is a future period after the first period; a generation unit configured to package and generate the first data to be reported by the Internet of Things device in the first period using the first device information and the second secret key information.

[0082] Optionally, the selection unit includes: a selection subunit configured to randomly select an encryption algorithm to be used between the Internet of Things device and the server in a third period; a generation subunit configured to generate key data of the encryption algorithm; a determination subunit configured to determine the encryption algorithm and the key data as the second secret key information to be used between the Internet of Things device and the server in the third period, and locally store the second secret key information in the Internet of Things device.

[0083] Optionally, the selection subunit is further configured to: select a target encryption algorithm from an encryption algorithm library using a first random algorithm, where the encryption algorithm library includes a plurality of symmetric encryption algorithms and a plurality of asymmetric encryption algorithms; generate a target usage time of the target encryption algorithm using a second random algorithm; determine the target encryption algorithm as the encryption algorithm to be used between the Internet of Things device and the server in a third period, where the duration of the third period is the target usage time.

[0084] Optionally, the apparatus further includes: a second acquisition module configured to acquire initial device information to be reported by the Internet of Things device in an initial period after activating the Internet of Things device before the first acquisition module acquires the first data to be reported by the Internet of Things device in the first period; a processing module configured to acquire preset initial secret key information and randomly select third secret key information to be used between the Internet of Things device and the server in a fourth period, where the fourth period is the next period after the initial period; a second encryption module configured to encrypt the initial device information and the third secret key information using the initial secret key information to obtain initial encrypted data; a second reporting module configured to report the initial encrypted data to the server.

[0085] Optionally, the device further includes: a receiving module, configured to receive a retransmission request sent by the server for the first encrypted data after the first reporting module reports the first encrypted data to the server; a third obtaining module, configured to, in response to the retransmission request, obtain preset initial key information and randomly select second key information to be used between the IoT device and the server in a third period, where the third period is a future period after the first period; a third encryption module, configured to encrypt the first data and the second key information by using the initial key information to obtain second encrypted data; and a third reporting module, configured to report the second encrypted data to the server.

[0086] The solution of this embodiment further provides a data encryption and transmission system, including an electronic device and a server, where the electronic device is communicatively connected to the server. The electronic device includes a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the method in the above embodiment; the server is configured to receive the first encrypted data and decrypt the first encrypted data by using the first key information.

[0087] An embodiment of the present invention further provides a storage medium, in which a computer program is stored. The computer program is configured to execute the steps in any one of the above method embodiments when running.

[0088] Optionally, in this embodiment, the above storage medium may be configured to store a computer program for execution:

[0089] S1. Obtain first data to be reported by the IoT device in a first period;

[0090] S2. Read, locally, first key information randomly selected by the IoT device and the server in a second period, where the second period is a historical period before the first period;

[0091] S3. Encrypt the first data by using the first key information to obtain first encrypted data;

[0092] S4. Report the first encrypted data to the server.

[0093] Optionally, in this embodiment, the above storage medium may include, but is not limited to: various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disc.

[0094] An embodiment of the present invention further provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0095] Optionally, the above electronic device may further include a transmission device and an input / output device. Among them, the transmission device is connected to the above processor, and the input / output device is connected to the above processor.

[0096] Optionally, in this embodiment, the above processor may be configured to execute the following steps through a computer program:

[0097] S1. Obtain first data to be reported by the Internet of Things device in the first period;

[0098] S2. Read, locally, first secret key information randomly selected by the Internet of Things device and the server in the second period, where the second period is a historical period before the first period;

[0099] S3. Encrypt the first data using the first secret key information to obtain first encrypted data;

[0100] S4. Report the first encrypted data to the server.

[0101] The electronic device provided by the embodiment of the present application may specifically be a module capable of implementing a communication function or a terminal device including the module, etc. The terminal device may be a mobile terminal or an intelligent terminal. The mobile terminal may specifically be at least one of a mobile phone, a tablet computer, a laptop computer, etc.; the intelligent terminal may specifically be an intelligent vehicle, an intelligent watch, a shared bicycle, an intelligent cabinet, etc. that contain a wireless communication module; the module may specifically be a wireless communication module, such as any one of a 2G communication module, a 3G communication module, a 4G communication module, a 5G communication module, an NB-IOT communication module, etc.

[0102] Optionally, specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and details are not described herein again.

[0103] The serial numbers of the above embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.

[0104] In the above embodiments of the present application, the descriptions of the respective embodiments have their own emphases. For parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

[0105] In several embodiments provided by the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are merely illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of units or modules can be in electrical or other forms.

[0106] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0107] In addition, in each embodiment of the present application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

[0108] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the methods in each embodiment of the present application. The foregoing storage medium includes: USB flash drives, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), mobile hard disks, magnetic disks or optical discs and other various media that can store program codes.

[0109] The above is only the preferred embodiment of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.

Claims

1. A method for encrypted transmission of data, characterized in that, Including: Obtain first data to be reported by the Internet of Things device in the first period; Read locally the first secret key information randomly selected by the Internet of Things device and the server in the second period, where the second period is a historical period before the first period; Encrypt the first data using the first secret key information to obtain first encrypted data; Report the first encrypted data to the server.

2. The method according to claim 1, characterized in that, Obtaining first data to be reported by the Internet of Things device in the first period includes: Obtain first device information to be reported by the Internet of Things device in the first period; Randomly select second secret key information to be used between the Internet of Things device and the server in the third period, where the third period is a future period after the first period; Use the first device information and the second secret key information to package and generate the first data to be reported by the Internet of Things device in the first period.

3. The method according to claim 2, characterized in that, Randomly selecting second secret key information to be used between the Internet of Things device and the server in the third period includes: Randomly select an encryption algorithm to be used between the Internet of Things device and the server in the third period; Generate key data of the encryption algorithm; Determine the encryption algorithm and the key data as the second secret key information to be used between the Internet of Things device and the server in the third period, and store the second secret key information locally in the Internet of Things device.

4. The method according to claim 3, characterized in that, Randomly selecting an encryption algorithm to be used between the Internet of Things device and the server in the third period includes: Select a target encryption algorithm from an encryption algorithm library using a first random algorithm, where the encryption algorithm library includes several symmetric encryption algorithms and several asymmetric encryption algorithms; Generate a target usage time of the target encryption algorithm using a second random algorithm; Determine the target encryption algorithm as the encryption algorithm to be used between the Internet of Things device and the server in the third period, where the duration of the third period is the target usage time.

5. The method according to claim 1, characterized in that, Before obtaining first data to be reported by the Internet of Things device in the first period, the method further includes: After activating the Internet of Things device, obtain initial device information to be reported by the Internet of Things device in the initial period; Obtain preset initial secret key information, and randomly select third secret key information to be used between the Internet of Things device and the server in the fourth period, where the fourth period is the next period after the initial period; Encrypt the initial device information and the third secret key information using the initial secret key information to obtain initial encrypted data; Report the initial encrypted data to the server.

6. The method according to claim 1, characterized in that, After reporting the first encrypted data to the server, the method further includes: Receive a retransmission request sent by the server for the first encrypted data; Respond to the retransmission request, obtain preset initial secret key information, and randomly select second secret key information to be used between the Internet of Things device and the server in the third period, where the third period is a future period after the first period; Encrypt the first data and the second secret key information using the initial secret key information to obtain second encrypted data; Report the second encrypted data to the server.

7. An apparatus for encrypting and transmitting data, characterized in that Including: A first acquisition module, configured to acquire first data to be reported by the Internet of Things device in a first period; A reading module, configured to locally read first secret key information randomly selected by the Internet of Things device and the server in a second period, where the second period is a historical period before the first period; A first encryption module, configured to encrypt the first data by using the first secret key information to obtain first encrypted data; A first reporting module, configured to report the first encrypted data to the server.

8. An encrypted data transmission system, characterized in that, Including an electronic device and a server, the electronic device is communicatively connected to the server, where The electronic device includes a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the method according to any one of claims 1 to 6; The server is configured to receive the first encrypted data and decrypt the first encrypted data by using the first secret key information.

9. A storage medium, characterized in that, A computer program is stored in a storage medium, where the computer program is configured to execute the method according to any one of claims 1 to 6 when running.