Data transmission method and device, server, terminal equipment and storage medium
By generating the second encryption information based on the terminal device information, the data transmission between the server and the terminal device is encrypted, and the problem of low security in the prior art is solved, and the data security transmission in the case of leakage of encrypted information is realized.
Patent Information
- Application Number
- CN202311381833.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-23
- Publication Date
- 2025-04-25
AI Technical Summary
In the prior art, data transmission between the terminal device and the server has a problem of low security, especially when the same group key is used between the terminal devices of the same model, the data is easily decrypted by other terminal devices of the same model.
By acquiring the device information of the terminal device, and generating a new second encryption information based on the information and the preset encryption information, the target data is encrypted and sent to the terminal device. After receiving the terminal device, the same device information and encryption information are used to generate the second encryption information for decryption.
In the case of the first encrypted information leaking, the secure transmission of data can still be ensured, and the security of data transmission is improved.
Smart Images

Figure CN119892380A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data transmission method, apparatus, server, terminal equipment and storage medium. Background Art
[0002] With the development of science and technology, various terminal devices appear in people's daily lives, and people can use terminal devices to transmit various required data.
[0003] For example, various applications (Application, APP) are installed in the terminal device. During use, the user can interact with other terminal devices or servers by running the application. In some communication scenarios, in order to improve the reliability of the interaction between the terminal device and other terminal devices or servers, the interaction between the terminal device and the server needs to be encrypted. For example, the existing terminal device and the server or other terminal device have pre-defined keys. When transmitting data, the data can be encrypted based on the pre-defined keys to achieve encrypted transmission. In some terminal devices that use group keys, each terminal device of the same model will also use the same group key. Therefore, the data interacted between a terminal device and the server can also be decrypted by the group key of other terminal devices of the same model, resulting in low security of data transmission. Summary of the invention
[0004] In order to improve the security of data transmission, the embodiments of the present application provide a data transmission method, apparatus, server, terminal device and storage medium. The technical solution is as follows:
[0005] In one aspect, the present application provides a data transmission method, applied to a server, the method comprising:
[0006] Get device information of terminal device;
[0007] Generate second encrypted information according to the device information and the first encrypted information, where the first encrypted information is the encrypted information preset between the terminal device and the server;
[0008] The target data is encrypted according to the second encryption information and sent to the terminal device, wherein the target data is the data that the server currently needs to send to the terminal device.
[0009] In one aspect, the present application provides a data transmission method, applied to a terminal device, the method comprising:
[0010] Receiving target data sent by a server, wherein the target data is encrypted by second encryption information generated by the server based on device information of the terminal device and first encryption information, wherein the first encryption information is encryption information preset between the terminal device and the server;
[0011] Acquire device information of the terminal device;
[0012] generating the second encrypted information according to the device information and the first encrypted information;
[0013] The target data is decrypted according to the second encryption information.
[0014] In one aspect, the present application provides a data transmission device, applied to a server, the device comprising:
[0015] A first acquisition module, used to acquire device information of a terminal device;
[0016] A first generating module, configured to generate second encrypted information according to the device information and first encrypted information, wherein the first encrypted information is encrypted information preset between the terminal device and the server;
[0017] The first encryption module is used to encrypt target data according to the second encryption information and send the target data to the terminal device, wherein the target data is the data that the server currently needs to send to the terminal device.
[0018] In one aspect, the present application provides a data transmission device, applied to a terminal device, the device comprising:
[0019] a first receiving module, configured to receive target data sent by a server, wherein the target data is encrypted by second encryption information generated by the server based on device information of the terminal device and first encryption information, wherein the first encryption information is encryption information preset between the terminal device and the server;
[0020] A second acquisition module, used to acquire device information of the terminal device;
[0021] A second generating module, configured to generate the second encrypted information according to the device information and the first encrypted information;
[0022] The first decryption module is used to decrypt the target data according to the second encryption information.
[0023] In another aspect, the present application provides a server, comprising a processor and a memory, wherein the memory stores a computer program, and the computer program is executed by the processor to implement the data transmission method as described in one aspect.
[0024] In another aspect, the present application provides a terminal device, which includes a processor and a memory, wherein the memory stores a computer program, and the computer program is executed by the processor to implement the data transmission method as described in one aspect.
[0025] In another aspect, the present application provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is executed by a processor to implement the data transmission method as described in one aspect.
[0026] On the other hand, an embodiment of the present application provides a computer program product. When the computer program product is executed on a computer, the computer is enabled to execute the data transmission method as described in one aspect above.
[0027] On the other hand, an embodiment of the present application provides an application publishing platform, which is used to publish a computer program product, wherein when the computer program product runs on a computer, the computer executes the data transmission method described in one aspect above.
[0028] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:
[0029] The server obtains the device information of the terminal device; generates the second encrypted information based on the device information and the first encrypted information, the first encrypted information being the encrypted information preset between the terminal device and the server; encrypts the target data based on the second encrypted information and sends it to the terminal device, the target data being the data that the server currently needs to send to the terminal device. In the embodiment of the present application, during the data interaction between the server and the terminal device, the device information of the terminal device can be used, and new second encrypted information can be generated based on the device information and the preset encrypted information, the target data can be encrypted using the second encrypted information, and sent to the terminal device, the process involves the device information of the terminal device and the generated new second encrypted information, and the secure transmission of the data can still be guaranteed in the event of the leakage of the first encrypted information, thereby improving the security of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0031] Figure 1This is a schematic diagram of a scenario interaction between a server and a terminal device involved in an exemplary embodiment of the present application;
[0032] Figure 2 is a schematic structural diagram of an example of an electronic device provided in an embodiment of the present application;
[0033] Figure 3 is a method flow chart of a data transmission method provided by an exemplary embodiment of the present application;
[0034] Figure 4 is a method flow chart of a data transmission method provided by an exemplary embodiment of the present application;
[0035] Figure 5 is a method flow chart of a data transmission method provided by an exemplary embodiment of the present application;
[0036] Figure 6 is a method flow chart of a data transmission method provided by an exemplary embodiment of the present application;
[0037] Figure 7 is a structural block diagram of a data transmission device provided by an exemplary embodiment of the present application;
[0038] Figure 8 is a structural block diagram of a data transmission device provided by an exemplary embodiment of the present application;
[0039] Fig. 9 It is a structural diagram of another example of a data transmission device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0040] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0041] The term "multiple" as used herein refers to two or more than two. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship.
[0042] The solution provided by the present application can be used in real-life scenarios in which people use terminal devices in their daily lives to interact with servers or other terminal devices through terminal devices. To facilitate understanding, the application scenarios involved in the embodiments of the present application are first briefly introduced below.
[0043] Please refer to Figure 1 , which shows a schematic diagram of a scenario interaction between a server and a terminal device involved in an exemplary embodiment of the present application. Figure 1 As shown, a terminal device 110 and a server 120 are included.
[0044] The terminal device 110 may be an electronic device with communication functions, for example, the terminal device may be a mobile phone, a tablet computer, an e-book reader, smart glasses, a smart watch, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV), a notebook computer, a portable computer, a desktop computer, etc.
[0045] The server 120 is a server, or a plurality of servers, or a virtualization platform, or a cloud computing service center. In actual implementation, the server 120 may be a server that provides background services for the application programs installed in the terminal device 110 .
[0046] The terminal device 110 is connected to the server 120 via a communication network. Optionally, the communication network may be a wired network or a wireless network.
[0047] Optionally, the above-mentioned wireless network or wired network uses standard communication technology and / or protocol. The network is usually the Internet, but it can also be any network, including but not limited to any combination of local area network (LAN), metropolitan area network (MAN), wide area network (WAN), mobile, wired or wireless network, dedicated network or virtual private network. In some embodiments, the data exchanged through the network is represented by technology and / or format including Hyper Text Mark-up Language (HTML), Extensible Markup Language (XML), etc. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec) can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technology can also be used to replace or supplement the above-mentioned data communication technology.
[0048] Please refer to Figure 2 , is a schematic diagram of an example structure of a terminal device provided in an embodiment of the present application. Figure 2 The terminal device shown includes components such as a processor 210, a memory 220, a transceiver 230, a display unit 240, an input unit 250, a sensor 260, an audio circuit 270, and a power module 280.
[0049] The processor 210 is the control center of the terminal device, and uses various interfaces and lines to connect various parts of the entire terminal device. By running or executing software programs and / or modules stored in the memory 220, and calling data stored in the memory 220, the processor 210 performs various functions of the terminal device and processes data, thereby monitoring the terminal device as a whole. Optionally, the processor 210 may include one or more processing units; optionally, the processor 210 may integrate an application processor, which mainly processes operating devices, user interfaces, and application programs, etc. Of course, other processors may also be included, which are not listed here one by one.
[0050] The memory 220 can be used to store software programs and modules. The processor 210 executes various functional applications and data processing of the terminal device by running the software programs and modules stored in the memory 220. The memory 220 can mainly include a program storage area and a data storage area, wherein the program storage area can store operating devices, at least one application required for a function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the terminal device (such as audio data, a phone book, etc.), etc. In addition, the memory 220 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0051] The transceiver 230 can provide wireless communication solutions applied to terminal devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The transceiver 230 can be one or more devices integrating at least one communication processing module, for example, integrating an antenna and a baseband processor into the transceiver 230, or integrating an antenna and a modem processor into the transceiver 230, etc., which are not limited here.
[0052] The display unit 240 may be used to display information input by the user or information provided to the user and various menus of the terminal device. The display unit 240 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc., which is not limited here.
[0053] The input unit 250 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the terminal device. Specifically, the input unit 250 can collect the user's operations on or near it, and drive the corresponding connection device according to a pre-set program. In addition, the input unit 250 may include a touch panel, which can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel, the input unit 250 may also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of function keys (such as volume control keys, switch keys, etc.), trackballs, joysticks, etc.
[0054] The terminal device may also include at least one sensor 260, such as a gyroscope sensor, a motion sensor, and other sensors. The motion sensor may include an acceleration sensor for detecting the magnitude of acceleration in all directions, and the magnitude and direction of gravity when stationary, which may be used for applications that identify the posture of the terminal device, such as horizontal and vertical screen switching, related games, magnetometer posture calibration, etc. As for other sensors that may be configured in the terminal device, such as a pressure gauge, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., they will not be described in detail here.
[0055] The audio circuit 270 may include a speaker and a microphone, and may provide an audio interface between the user and the terminal device. The audio circuit 270 may transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 270 and converted into audio data, and then the audio data is output to the processor 210 for processing, and then sent to another terminal device through the video circuit, or the audio data is output to the memory 220 for further processing.
[0056] The terminal device also includes a power module 280 for supplying power to various components. Optionally, the power module 280 can be logically connected to the processor 210 through a power management device, so as to manage charging, discharging, power consumption and other functions through the power management device.
[0057] Although not shown, the terminal device may further include a camera. Optionally, the camera may be located at the front or rear of the terminal device, which is not limited in the embodiment of the present application.
[0058] It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the terminal device. In other embodiments of the present application, the terminal device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0059] Usually, the above Figure 2 The terminal device shown needs to be equipped with a corresponding operating system and run based on the operating system. For example, the operating system of the electronic device can be an Android system, an iOS system, a Linux system, etc.
[0060] Optionally, the user can use the terminal device 110 to interact with the server 120 for data. In some business scenarios of the terminal device 110, the data interaction between the terminal device 110 and the server 120 needs to be kept confidential, so key information can be preset in the terminal device when the terminal device leaves the factory. The preset key information can be pre-defined by the manufacturer of the terminal device and the server. When the terminal device interacts with the server for data, the preset key information can be used for encryption and decryption.
[0061] Optionally, the group key may be a symmetric key, that is, the symmetric key is pre-installed in the terminal device when leaving the factory, and both the terminal device and the server will record the symmetric key; or, the group key may also be an asymmetric key, that is, a public-private key pair. For example, the public-private key pair is pre-installed in the terminal device when leaving the factory, but the private key does not leave the terminal device, and the server will also record the public-private key pair.
[0062] Normally, for multiple terminal devices of the same model, the key information is usually set to be the same. For example, for each terminal device of model one, the same key information is set in each terminal device. When these terminal devices interact with the server, the key used to encrypt the data is the same. If the key of one of the terminal devices is obtained, the data transmitted by the other terminal devices can also be decrypted. Therefore, there is a problem of low security of data transmission.
[0063] For the security of data transmission, the present application provides a data transmission method that can be applied to a server, by obtaining device information of a terminal device; generating second encryption information based on the device information and first encryption information, and encrypting the data that the server currently needs to send to the terminal device based on the second encryption information to achieve a more confidential effect.
[0064] Please refer to Figure 3 , which shows a method flow chart of a data transmission method provided by an exemplary embodiment of the present application, and the data transmission method can be applied to a server. Figure 3 As shown, the data transmission method may include the following steps:
[0065] Step 301, obtaining device information of a terminal device.
[0066] Optionally, the server may establish a communication connection with the terminal device and obtain the device information of the terminal device through the communication connection. For example, the server may send an information query request to the terminal device and obtain the device information of the terminal device through the information query request. Alternatively, the server may pre-store the device information of the terminal device in a memory in advance, and obtain the device information of the terminal device pre-stored locally when it is needed.
[0067] Optionally, the device information of the terminal device may be a unique identifier of the terminal device, for example, the device number of the terminal device, the subscriber identity module (SIM) card number, the current network number of the terminal device, device attributes, etc., which may indicate the uniqueness of the terminal device.
[0068] Step 302, generating second encrypted information according to the device information and the first encrypted information, where the first encrypted information is the preset encrypted information between the terminal device and the server.
[0069] Optionally, the server generates the second encrypted information based on the acquired device information and the pre-set encryption information. For example, the first encryption information may be a symmetric key, that is, the encryption information stored on the server side is the same as the encryption information stored on the terminal device side, and the server generates the second encrypted information based on the pre-set generation method.
[0070] Step 303: encrypt the target data according to the second encryption information and send it to the terminal device. The target data is the data that the server currently needs to send to the terminal device.
[0071] Optionally, when the server needs to send data to the terminal device, the data is encrypted based on the generated second encryption information, and the target data sent to the terminal device is encrypted by the second encryption information. Even if the first encryption information of the same type of terminal device in the related technology has been leaked, it is still necessary to crack the second encryption information, thereby improving the security of data sent by the server to the terminal device.
[0072] In summary, the server obtains the device information of the terminal device; generates the second encrypted information based on the device information and the first encrypted information, the first encrypted information is the preset encrypted information between the terminal device and the server; encrypts the target data based on the second encrypted information and sends it to the terminal device, the target data is the data that the server currently needs to send to the terminal device. In the embodiment of the present application, during the data interaction between the server and the terminal device, the device information of the terminal device can be used, and new second encrypted information can be generated based on the device information and the preset encrypted information, and the target data can be encrypted using the second encrypted information and sent to the terminal device. The process involves the device information of the terminal device and the generated new second encrypted information, and the secure transmission of data can still be guaranteed in the event of leakage of the first encrypted information, thereby improving the security of data transmission.
[0073] After the server sends the target data to the terminal device, when the terminal device receives the target data and wants to obtain the content of the target data, it needs the same second encryption information to decrypt it. Therefore, a corresponding decryption process is also required on the terminal device side.
[0074] Below, the corresponding data decryption scheme is described from the perspective of the terminal device. Figure 4 , which shows a method flow chart of a data transmission method provided by an exemplary embodiment of the present application, and the data transmission method can be applied to a terminal device. Figure 4 As shown, the data transmission method may include the following steps:
[0075] Step 401, receiving target data sent by a server, the target data is encrypted by the server based on the device information of the terminal device and second encryption information generated by the server based on the first encryption information, the first encryption information is encryption information preset between the terminal device and the server.
[0076] The server sends the encrypted target data to the terminal device via a communication connection, and the terminal device receives the target data sent by the server.
[0077] Step 402: Obtain device information of the terminal device.
[0078] Optionally, the terminal device can query and obtain its own device information. In one possible implementation, during the interaction between the terminal device and the server, if a certain data transmission scenario is entered, the developer can pre-set the following provisions in the server and the terminal device: In this data transmission scenario, the server and the terminal device need to generate a second encryption information and encrypt the transmitted data based on the second encryption information. Therefore, in this data transmission scenario, after the terminal device receives the target data, it can actively obtain the device information of the terminal device and execute subsequent steps. Among them, the content of the device information can be the same as the device information in the above step 301, which will not be repeated here.
[0079] Step 403: Generate second encrypted information according to the device information and the first encrypted information.
[0080] Step 404: decrypt the target data according to the second encryption information.
[0081] Optionally, the terminal device may also generate second encrypted information based on the acquired device information and the first encrypted information pre-stored in the terminal device, and decrypt the target data based on the second encrypted information.
[0082] In summary, the target data sent by the server is received, and the target data is encrypted by the second encryption information generated by the server based on the device information of the terminal device and the first encryption information, and the first encryption information is the encryption information preset between the terminal device and the server; the device information of the terminal device is obtained; the second encryption information is generated according to the device information and the first encryption information; the target data is decrypted according to the second encryption information. In an embodiment of the present application, during the data interaction between the server and the terminal device, the device information of the terminal device can be used, and new second encryption information can be generated based on the device information and the preset encryption information, and the target data can be encrypted using the second encryption information and sent to the terminal device. The terminal device side also generates the same second encryption information and decrypts it based on the second encryption information, so that the secure transmission of data can still be guaranteed in the event of the leakage of the first encryption information, thereby improving the security of data transmission.
[0083] Next, the interaction between the terminal device and the server is used to illustrate the above Figure 3 and Figure 4 The illustrated embodiments are presented by way of example.
[0084] Please refer to Figure 5 , which shows a method flow chart of a data transmission method provided by an exemplary embodiment of the present application, and the data transmission method can be applied to a server. Figure 5 As shown, the data transmission method may include the following steps:
[0085] Step 501: The server obtains device information of the terminal device.
[0086] Optionally, the relevant content of the device information can refer to the description in the above step 301, which will not be repeated here.
[0087] Optionally, the device information of the terminal device obtained by the server may be default information. For example, the device information 1 is the default information set by the developer. When the server needs to obtain the device information of the terminal device, the default information can be directly obtained.
[0088] In a possible implementation, the device information may also be determined based on the target device range. For example, the device information includes multiple types of information, and the server may perform step 501 as follows: determine the target device range, which is composed of various terminal devices to which the server currently needs to send data; and obtain device information of terminal devices of a type corresponding to the target device range based on the target device range.
[0089] For example, there are multiple terminal devices accessing the server. In the current data interaction scenario, the target device range is composed of the terminal devices to which data needs to be sent. If the verification information of the terminal device passes, the terminal device is added to the target device range, and the device information of the terminal device of the type corresponding to the target device range is obtained according to the target device range. Please refer to Table 1, which shows a correspondence table between a target device range and the device information of the terminal device involved in an exemplary implementation of the present application.
[0090] Table 1 Correspondence between target device range and device information of terminal device
[0091] Target device range Device Information Target device range 1 Equipment Information 1 Target device range 2 Equipment Information 2 Target device range 3 Equipment Information 3 …… ……
[0092] Optionally, if the target device range where the terminal device is located is within the target device range 1, then, by querying the table 1, the device information corresponding to the target device range 1 is the device information 1. When acquiring the device information, the device information 1 can be acquired from the various received device information. Optionally, the device information 1 here can also include device information corresponding to one or more types.
[0093] Optionally, the server may determine the target device range as follows: determine the data transmission scenario of the terminal device; divide the terminal device according to the data transmission scenario of the terminal device, and determine the target device range where the terminal device is located. For example, in actual applications, the server may determine the data transmission scenario between the server and the terminal device, divide the terminal device according to the data transmission scenario of the terminal device, and determine the target device range where the terminal device is located. For example, the above data transmission scenario is in the scenario where sensitive data is sent to a small range of devices. When the server needs to send sensitive data to a small range of devices consisting of several terminal devices, the sensitive data may be data with a confidentiality level higher than a preset confidentiality level. The server starts the process of obtaining device information for each terminal device that needs to send sensitive data.
[0094] Step 502: The server generates second encrypted information according to the device information and the first encrypted information. The first encrypted information is the preset encrypted information between the terminal device and the server.
[0095] Optionally, after obtaining the device information, the server generates the second encrypted information according to the device information and the first encrypted information. For example, the server can use the device information as a derivation parameter and generate the second encrypted information based on the first encrypted information according to a preset derivation algorithm. Optionally, the generated second encrypted information can be a symmetric key or an asymmetric key.
[0096] Step 503: The server encrypts the target data according to the second encryption information and sends it to the terminal device. The target data is the data that the server currently needs to send to the terminal device.
[0097] Optionally, when the server needs to send data to the terminal device, the target data is encrypted using the second encryption information.
[0098] Step 504: The terminal device receives the target data sent by the server.
[0099] Step 505: The terminal device obtains device information of the terminal device.
[0100] Optionally, the device information obtained by the terminal device needs to be the same as the device information used by the server to generate the second encrypted information, so that the same second encrypted information can be generated by itself. In one possible implementation, the server generates the second encrypted information according to the default device information, so the terminal device can also obtain the default device information.
[0101] In a possible implementation, if the server obtains the device information of the terminal device of the type corresponding to the target device range through the target device range, the target data sent above may carry target indication information, and the target indication information may indicate the type of device information used by the server when generating the second encrypted information. In other words, the target data contains data indicating the type of device information, and when the terminal device obtains the device information of the terminal device, it may obtain the device information of the same type of terminal device according to the data indicating the type of device information contained in the target data.
[0102] Step 506: The terminal device generates second encrypted information according to the device information and the first encrypted information.
[0103] Step 507: The terminal device decrypts the target data according to the second encryption information.
[0104] Optionally, the terminal device may generate the second encrypted information using the device information and the first encrypted information in the same manner as the server generates the second encrypted information using the device information and the first encrypted information, which will not be described in detail here. That is, the terminal device generates the same second encrypted information as the server based on the same device information and the first encrypted information, and then decrypts the target data to achieve data transmission.
[0105] In summary, in the embodiment of the present application, during the data interaction between the server and the terminal device, the device information of the terminal device can be used to generate new second encryption information based on the device information and the preset encryption information, and the target data can be encrypted using the second encryption information and sent to the terminal device. The process involves the device information of the terminal device and the generated new second encryption information. In the event of leakage of the first encryption information, the secure transmission of data can still be guaranteed, thereby improving the security of data transmission. In addition to achieving the above effects, a symmetric key for encrypting and sending data can also be derived based on the group key and combined with the device information. To a certain extent, the potential risk of unexpected devices being able to decrypt data and the expansion of the scope of knowledge of sent data caused by the sharing of group keys across device models is reduced, thereby improving the security of the solution.
[0106] In addition, this application can also flexibly select device information as key derivation parameters according to the target device range, and can flexibly implement fine-grained, cryptographic-level data isolation between terminal devices for different devices in the data delivery solution. This limits the range of devices that have the ability to decrypt and deliver data to a certain extent, improving the security of the solution.
[0107] In one possible implementation, the server can also obtain the device information of the terminal device through an information query request, and the returned device information also includes verification information. The server verifies the verification information, and after the verification information passes the verification, the device information required to generate the second encryption information is obtained from the obtained device information, thereby improving the security of data transmission.
[0108] Please refer to Figure 6 , which shows a method flow chart of a data transmission method provided by an exemplary embodiment of the present application, and the data transmission method can be applied to a server. Figure 6 As shown, the data transmission method may include the following steps:
[0109] Step 601: The server sends an information query request to the terminal device, where the information query request is used to obtain device information of the terminal device.
[0110] Optionally, a communication connection is established between the server and the terminal device, and a secure connection and encrypted transmission channel are established according to an industry standard remote communication protocol. The information query request sent may be encrypted and transmitted based on the first encrypted information.
[0111] Optionally, in this embodiment, the device information is first obtained through an information query request, and the device information of the terminal device obtained can be a unique identifier of the terminal device. For example, the device number of the terminal device, the subscriber identity module (SIM) card number, the current network number of the terminal device, the device attributes, etc. can indicate the uniqueness of the terminal device.
[0112] Optionally, through the information query request, the server can obtain one or more types of device information of the terminal device, which is not limited in the present application.
[0113] Step 602: The terminal device receives an information query request sent by the server.
[0114] Step 603: The terminal device returns the acquired device information to the server. The device information is encrypted based on the first encryption information. The device information also includes verification information.
[0115] After receiving the information query request, the terminal device obtains the corresponding device information by querying the device information requested by the information query request, and returns the device information to the server. For example, if the device information obtained above is the device model of the terminal device, then the device information returned here is also the device model, or if the device information obtained is the SIM card number of the terminal device, then the device information returned here is also the SIM card number. The type of device information returned can be one or more.
[0116] Step 604: the server receives the device information returned by the terminal device.
[0117] Correspondingly, the server receives the device information returned by the terminal device.
[0118] Step 605: The server decrypts the received device information according to the first encryption information, verifies the verification information, and obtains the device information if the verification information passes the verification.
[0119] Optionally, in order to improve the security of data transmission between the terminal device and the server, the terminal device may also carry verification information when returning the device information. For example, the terminal device may also obtain verification information and assemble the verification information into the device information to be sent. The verification information may include a terminal device certificate (such as an Android attestation cert, or a PKI certificate preset by the terminal device manufacturer, etc.), and / or a signature value obtained by signing with the key corresponding to the terminal device certificate.
[0120] After receiving the device information returned by the terminal device, the server first decrypts the received device information according to the first encryption information and then verifies the verification information. If the verification information passes the verification, the step of obtaining the device information is performed. If the verification information fails the verification, the terminal device is marked as a risky device.
[0121] Optionally, cert represents the terminal device certificate, signature represents the signature value, and the obtained device information can be recorded as deviceInfo. Then, when returning the obtained device information to the server, the obtained device information, terminal device certificate, and signature value can be assembled to obtain the overall information {deviceInfo, cert, signature}, and the overall information is returned to the server. After the server obtains the device information, it decrypts it through the first encrypted information, obtains the cert terminal device certificate and signature value, verifies the cert terminal device certificate and signature value, obtains the device information when the verification passes, and marks the terminal device as a risky device when the verification fails.
[0122] Optionally, the server can verify the signature value of the cert terminal device certificate according to the following process. For example, the server performs certificate chain verification on the cert according to the industry standard solution to confirm the correctness and legality of the cert. If the cert successfully passes the certificate chain verification, the signature is verified using the cert according to the industry standard solution. If the signature verification is successful, the server confirms that the verification information in the received device information is legal and authentic and has not been tampered with, that is, it has passed the verification. If the signature verification fails, the server considers the current communicating terminal device to be a risky device and notifies the relevant business developers to handle the corresponding risks.
[0123] In one possible implementation, since the device information obtained above includes multiple types of information, for example, the device number of the terminal device, the device model, the device SIM card number and other types of information, in this step, after determining that the verification information has passed the verification, the method for obtaining the device information of the terminal device can be as follows: determine the target device range, the target device range is composed of the various terminal devices that the server currently needs to send data to; according to the target device range, obtain the device information of the terminal device of the type corresponding to the target device range. The method for determining the target device range and the method for obtaining the device information here can refer to the description in the above step 601, which will not be repeated here.
[0124] Optionally, in this solution, through the above steps, it can be seen that when the verification information of the terminal device passes the verification, the terminal device is included in the current target device range and the device information of the terminal device is obtained.
[0125] In a possible implementation, the terminal device may also carry the type of device information to be queried in the information query request sent above, and obtain the device information of the terminal device in a targeted manner without requiring the terminal device to return various device information. For example, the server first determines the type of device information of the terminal device that needs to be obtained, and sends the type to the terminal device through an information query request. After receiving the information query request, the terminal device can obtain the corresponding type of device information and return it to the server.
[0126] Optionally, the type of the device information to be queried can be one or more types. Taking the case where the type of the device information to be queried is one type, for example, a string can be randomly generated in the server, denoted as challenge, and the type of device information of the terminal device to be queried and the string are encapsulated to form an information query request. The information query request can be as follows {type of device information to be queried, challenge}. After sending the information query request to the terminal device, the terminal device searches for the device information corresponding to the type of device information to be queried in the information query request in the local terminal device according to the received information query request, denoted as deviceInfo, and the terminal device assembles the data packet {deviceInfo, challenge}, and the terminal device obtains its own verification information. The verification information can refer to the description of the above-mentioned related content, which will not be repeated here. The terminal device finally obtains the following assembled information: {deviceInfo, challenge, cert, signature}, and sends the information to the server.
[0127] After receiving {deviceInfo, challenge, cert, signature}, the server verifies the cert and signature in it according to the industry standard solution. The verification process can refer to the above content. If the verification passes, the terminal device is classified as a target device and the subsequent steps are executed.
[0128] Optionally, the device information obtained above may also be device information of a default or preset type, that is, the process of implementing this solution through the target device range is an example. In actual applications, there may also be other situations in which the corresponding type of device information that needs to be obtained is determined, which will not be repeated here.
[0129] Step 606: The server generates second encrypted information according to the device information and the first encrypted information. The first encrypted information is the preset encrypted information between the terminal device and the server.
[0130] Optionally, after obtaining the device information, the server generates the second encrypted information according to the device information and the first encrypted information. For example, the server can use the device information as a derivation parameter and generate the second encrypted information based on the first encrypted information according to a preset derivation algorithm. Optionally, the generated second encrypted information can be a symmetric key or an asymmetric key.
[0131] Step 607: The server encrypts the target data according to the second encryption information and sends it to the terminal device. The target data is the data that the server currently needs to send to the terminal device.
[0132] Optionally, when the server needs to send data to the terminal device, the target data is encrypted using the second encryption information.
[0133] Optionally, the server may also carry target indication information in the target data sent down, and the target indication information may indicate the type of device information used by the server when generating the second encrypted information. For example, the server identifies the part of the device information selected in the process of generating the second encrypted information, recorded as partDeviceInfoTag, and then indicates the device information used. The second encrypted information is recorded as DEK, and the server uses DEK to encrypt the data to be sent to the terminal device, recorded as plainText, and obtains the data ciphertext, recorded as cipherText. The server encapsulates partDeviceInfoTag and cipherText as {partDeviceInfoTag, cipherText}, and sends them together to the terminal device through remote transmission.
[0134] Step 608: The terminal device receives the target data sent by the server.
[0135] The target data is encrypted by the server based on the device information of the terminal device and the second encryption information generated by the first encryption information, and the first encryption information is the encryption information preset between the terminal device and the server.
[0136] Step 609: The terminal device obtains device information of the terminal device.
[0137] Step 610: The terminal device generates second encrypted information according to the device information and the first encrypted information.
[0138] Optionally, the device information obtained by the terminal device needs to be the same as the device information used by the server to generate the second encrypted information, so that the same second encrypted information can be generated by itself. In one possible implementation, the server generates the second encrypted information according to the default device information, so the terminal device can also obtain the default device information.
[0139] In a possible implementation, the server obtains the device information of the terminal device of the type corresponding to the target device range through the target device range. The target data sent above may carry target indication information, which may indicate the type of device information used by the server when generating the second encrypted information. In other words, the target data contains data indicating the type of device information, and when the terminal device obtains the device information of the terminal device, it can obtain the device information of the same type of terminal device according to the data indicating the type of device information contained in the target data.
[0140] For example, the server encapsulates partDeviceInfoTag and cipherText into {partDeviceInfoTag, cipherText}, and sends them to the terminal device through remote transmission. The terminal device receives {partDeviceInfoTag, cipherText}, searches for the same device information based on partDeviceInfoTag, and after obtaining the device information, uses the device information as a derived parameter and generates the second encrypted information based on the first encrypted information according to a preset derivation algorithm.
[0141] Step 611: The terminal device decrypts the target data according to the second encryption information.
[0142] For example, the ciphertext obtained above is cipherText, and the terminal device decrypts cipherText using the generated second encryption information to obtain the plaintext data plainText.
[0143] It should be noted that the process in this scheme is based on the example of the server starting to generate the second key information. In actual applications, the terminal device can also generate the second key information first, that is, execute the process of generating the second key information of the above-mentioned server, and encrypt the data to be uploaded to the server using the second key information. The server can also execute the process of the terminal device, obtain the corresponding device information based on the target indication information carried in the target data, and decrypt it. It will not be repeated here.
[0144] Optionally, the encryption algorithm involved in the above encryption process can be flexibly selected, such as the international standard Advanced Encryption Standard (AES) algorithm. The signature algorithm involved in signing can also be flexibly selected, such as the international standard Elliptic Curve Digital Signature Algorithm (ECDSA) algorithm, and the key derivation function involved in the preset derivation algorithm used to generate the second key information can be flexibly selected, such as the international standard HKDF.
[0145] The above-mentioned whole process is described as follows: The server in this scheme communicates with each terminal device to confirm the authenticity of the information of the terminal device. The server obtains the terminal device information (such as device attributes, model, etc.), and performs certificate chain verification and signature verification based on the signature certificate preset on the terminal device to confirm that the received device information has not been tampered with. The server derives a symmetric key based on the device group key and part of the device information, and then encrypts the sensitive data to be sent. The server sends the data ciphertext and the selected device information range to the terminal device, and the terminal device derives the key and then decrypts the data.
[0146] To sum up, in addition to being able to interact with data between the server and the terminal device in the embodiment of the present application, the device information of the terminal device can be used, and new second encryption information can be generated based on the device information and preset encryption information, and the target data can be encrypted using the second encryption information and sent to the terminal device. The process involves the device information of the terminal device and the newly generated second encryption information, and the secure transmission of data can still be guaranteed in the event of leakage of the first encryption information, thereby improving the security of data transmission.
[0147] In addition, in this solution, the server first queries the terminal device for the required device information through an information query request, so that the device information returned by the terminal device side can meet the type of device information desired by the server, and the terminal device does not need to transmit redundant and unnecessary device information, thereby improving the interaction efficiency.
[0148] In addition, the data encryption key used by the server to send data in this solution is derived from the group symmetric key, rather than directly encrypted using the group key. And the derivation parameters selected by the server are different between different target device ranges. In the event of a group symmetric key leak, the attack cost of the attacker to decrypt the data can be increased, which improves the security of the solution to a certain extent.
[0149] The following are device embodiments of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
[0150] Please refer to Figure 7 , which shows a structural block diagram of a data transmission device provided by an exemplary embodiment of the present application. The data transmission device 700 can be used in a server. Figure 3 , Figure 5 or Figure 6 All or part of the steps in the method provided by the illustrated embodiment are performed by the server. The data transmission device 700 includes:
[0151] The first acquisition module 701 is used to acquire device information of a terminal device;
[0152] A first generating module 702, configured to generate second encrypted information according to the device information and first encrypted information, where the first encrypted information is encrypted information preset between the terminal device and the server;
[0153] The first encryption module 703 is used to encrypt target data according to the second encryption information and send the target data to the terminal device. The target data is the data that the server currently needs to send to the terminal device.
[0154] In summary, the server obtains the device information of the terminal device; generates the second encrypted information based on the device information and the first encrypted information, the first encrypted information is the preset encrypted information between the terminal device and the server; encrypts the target data based on the second encrypted information and sends it to the terminal device, the target data is the data that the server currently needs to send to the terminal device. In the embodiment of the present application, during the data interaction between the server and the terminal device, the device information of the terminal device can be used, and new second encrypted information can be generated based on the device information and the preset encrypted information, and the target data can be encrypted using the second encrypted information and sent to the terminal device. The process involves the device information of the terminal device and the generated new second encrypted information, and the secure transmission of data can still be guaranteed in the event of leakage of the first encrypted information, thereby improving the security of data transmission.
[0155] Optionally, the device information includes multiple types of information, and the first acquisition module includes: a first determination unit and a first acquisition unit;
[0156] The first determining unit is used to determine a target device range, where the target device range is composed of various terminal devices to which the server currently needs to send data;
[0157] The first acquisition unit is used to acquire the device information of the terminal device of a type corresponding to the target device range according to the target device range.
[0158] Optionally, the first determining unit includes: a first determining subunit and a second determining subunit;
[0159] The first determining subunit is used to determine a data transmission scenario of the terminal device;
[0160] The second determining subunit is used to divide the terminal devices according to the data transmission scenarios of the terminal devices and determine the target device range in which the terminal devices are located.
[0161] Optionally, the device further comprises:
[0162] A first sending module, used for sending an information query request to the terminal device before obtaining the device information of the terminal device, wherein the information query request is used to obtain the device information of the terminal device;
[0163] A second receiving module, configured to receive device information returned by the terminal device, wherein the device information is encrypted based on the first encryption information, and the device information also includes verification information;
[0164] The first execution module is used to decrypt the received device information according to the first encryption information, and verify the verification information. If the verification information passes the verification, the step of obtaining the device information is executed.
[0165] Optionally, the device further comprises:
[0166] The first marking module is used to mark the terminal device as a risky device when the verification information fails to pass the verification.
[0167] Optionally, the first generating module is further configured to use the device information as a derivation parameter and generate the second encrypted information based on the first encrypted information according to a preset derivation algorithm.
[0168] Please refer to Figure 8 , which shows a structural block diagram of a data transmission device provided by an exemplary embodiment of the present application. The data transmission device 800 can be used in a terminal device. Figure 4 , Figure 5 or Figure 6 All or part of the steps in the method provided by the illustrated embodiment are performed by the server. The data transmission device 800 includes:
[0169] A first receiving module 801 is used to receive target data sent by a server, where the target data is encrypted by second encryption information generated by the server based on device information of the terminal device and first encryption information, where the first encryption information is encryption information preset between the terminal device and the server;
[0170] The second acquisition module 802 is used to acquire device information of the terminal device;
[0171] A second generating module 803, configured to generate the second encrypted information according to the device information and the first encrypted information;
[0172] The first decryption module 804 is used to decrypt the target data according to the second encryption information.
[0173] In summary, the target data sent by the server is received, and the target data is encrypted by the second encryption information generated by the server based on the device information of the terminal device and the first encryption information, and the first encryption information is the encryption information preset between the terminal device and the server; the device information of the terminal device is obtained; the second encryption information is generated according to the device information and the first encryption information; the target data is decrypted according to the second encryption information. In an embodiment of the present application, during the data interaction between the server and the terminal device, the device information of the terminal device can be used, and new second encryption information can be generated based on the device information and the preset encryption information, and the target data can be encrypted using the second encryption information and sent to the terminal device. The terminal device side also generates the same second encryption information and decrypts it based on the second encryption information, so that the secure transmission of data can still be guaranteed in the event of the leakage of the first encryption information, thereby improving the security of data transmission.
[0174] Optionally, the target data includes data indicating the type of device information, and the second acquisition module is further used to acquire device information of the same type of terminal device based on the data indicating the type of device information included in the target data.
[0175] Optionally, the device further comprises:
[0176] A third receiving module, used for receiving an information query request sent by the server before receiving the target data sent by the server, wherein the information query request is used to obtain the device information of the terminal device;
[0177] The first return module is used to return the acquired device information to the server, where the device information is encrypted based on the first encryption information. The device information also includes verification information so that the server can verify the verification information. If the verification information passes the verification, the target data is sent to the terminal device.
[0178] Optionally, the second generating module is further used to use the device information as a derivation parameter and generate the second encrypted information based on the first encrypted information according to a preset derivation algorithm.
[0179] Please refer to Fig. 9 , which is a structural diagram of another example of a data transmission device provided in an embodiment of the present application. Among them, the data transmission device 900 can be a terminal device or a server, which can implement the functions in the method provided in an embodiment of the present application. Among them, the data transmission device 900 can be a chip system. In the embodiment of the present application, the chip system can be composed of a chip, or it can include a chip and other discrete devices.
[0180] In terms of hardware implementation, the above communication module may be a transceiver, which is integrated in the data transmission device 900 to form a communication interface 903 .
[0181] The data transmission device 900 includes at least one processor 901, which is used to implement or support the data transmission device 900 to implement the functions of the terminal device in the method provided in the embodiment of the present application. Exemplarily, the processor 901 can execute the steps of obtaining device information of the terminal device; generating second encryption information based on the device information and the first encryption information; encrypting the target data according to the second encryption information, and sending it to the terminal device. Alternatively, receiving the target data sent by the server; obtaining the device information of the terminal device; generating second encryption information based on the device information and the first encryption information; decrypting the target data according to the second encryption information, etc. Please refer to the detailed description in the method example for details, which will not be repeated here.
[0182] The data transmission device 900 may also include at least one memory 902 for storing program instructions and / or data. The memory 902 is coupled to the processor 901. The coupling in the embodiment of the present application is an indirect coupling or communication connection between devices, units or modules, which may be electrical, mechanical or other forms, and is used for information exchange between devices, units or modules. The processor 901 may operate in conjunction with the memory 902. The processor 901 may execute program instructions stored in the memory 902. At least one of the at least one memory may be included in the processor.
[0183] The data transmission device 900 may further include a communication interface 903, which is used to communicate with other devices through a transmission medium, so that the device used in the data transmission device 900 can communicate with other devices. Exemplarily, the other device may be a network side device. The processor 901 may use the communication interface 903 to send and receive data. The communication interface 903 may specifically be a transceiver.
[0184] The specific connection medium between the communication interface 903, the processor 901 and the memory 902 is not limited in the embodiment of the present application. Fig. 9 In the embodiment, the memory 902, the processor 901 and the communication interface 903 are connected via a bus 904. Fig. 9 The connections between the other components are shown in bold lines, which are only for illustration and are not intended to be limiting. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0185] In the embodiment of the present application, the processor 901 can be a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the methods, steps and logic block diagrams disclosed in the embodiment of the present application. The general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware processor to be executed, or can be executed by a combination of hardware and software modules in the processor.
[0186] In an embodiment of the present application, the memory 902 may be a non-volatile memory, such as a hard disk drive (HDD) or a solid-state drive (SSD), etc., or a volatile memory (volatile memory), such as a random access memory (RAM). The memory is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory in the embodiment of the present application may also be a circuit or any other device that can implement a storage function, for storing program instructions and / or data.
[0187] Optionally, an embodiment of the present application further provides a server, the server comprising a processor and a memory, the memory storing a computer program, the computer program being executed by the processor to implement all or part of the steps executed by the server in the data transmission method described in the above embodiments.
[0188] Optionally, an embodiment of the present application further provides a terminal device, the terminal device comprising a processor and a memory, the memory storing a computer program, the computer program being executed by the processor to implement all or part of the steps performed by the terminal device in the data transmission method described in the above embodiments.
[0189] Optionally, an embodiment of the present application further provides a computer-readable medium storing a computer program, which is executed by a processor to implement all or part of the steps performed by a server or a terminal device in the data transmission method described in the above embodiments.
[0190] Optionally, an embodiment of the present application provides a computer program product, which, when executed on a computer, enables the computer to execute the data transmission method as described in one aspect above.
[0191] Optionally, an embodiment of the present application provides an application publishing platform, which is used to publish a computer program product, wherein when the computer program product runs on a computer, the computer executes the data transmission method as described in one aspect above.
[0192] It should be noted that: when the device provided in the above embodiment executes the control of the server or terminal device, only the division of the above functional modules is used as an example. In actual application, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0193] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0194] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0195] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A data transmission method, characterized in that: Applied to a server, the method comprises: Get device information of terminal device; Generate second encrypted information according to the device information and the first encrypted information, where the first encrypted information is the encrypted information preset between the terminal device and the server; The target data is encrypted according to the second encryption information and sent to the terminal device, wherein the target data is the data that the server currently needs to send to the terminal device.
2. The method according to claim 1, characterized in that The device information includes multiple types of information, and the acquiring of the device information of the terminal device includes: Determine a target device range, where the target device range is composed of various terminal devices to which the server currently needs to send data; According to the target device range, the device information of the terminal device of a type corresponding to the target device range is acquired.
3. The method according to claim 2, characterized in that Determining the target device range includes: Determining a data transmission scenario of the terminal device; The terminal devices are divided according to the data transmission scenarios of the terminal devices, and the target device range in which the terminal devices are located is determined.
4. The method according to claim 1, characterized in that: Before obtaining the device information of the terminal device, the method further includes: Sending an information query request to the terminal device, wherein the information query request is used to obtain device information of the terminal device; receiving device information returned by the terminal device, the device information being encrypted based on the first encryption information, and the device information also including verification information; The received device information is decrypted according to the first encryption information, and the verification information is verified. If the verification information passes the verification, the step of obtaining the device information is performed.
5. The method according to claim 4, characterized in that The method further comprises: When the verification information fails to pass the verification, the terminal device is marked as a risky device.
6. The method according to claim 1, characterized in that The step of generating the second encrypted information according to the device information and the first encrypted information includes: The device information is used as a derivation parameter, and the second encrypted information is generated based on the first encrypted information according to a preset derivation algorithm.
7. A data transmission method, characterized in that: Applied to a terminal device, the method comprises: Receiving target data sent by a server, wherein the target data is encrypted by second encryption information generated by the server based on device information of the terminal device and first encryption information, wherein the first encryption information is encryption information preset between the terminal device and the server; Acquire device information of the terminal device; generating the second encrypted information according to the device information and the first encrypted information; The target data is decrypted according to the second encryption information.
8. The method according to claim 7, characterized in that The target data includes data indicating the type of device information, and acquiring the device information of the terminal device includes: According to the data indicating the type of device information contained in the target data, the device information of the terminal device of the same type is acquired.
9. The method according to claim 7, characterized in that: Before receiving the target data sent by the server, the method further includes: receiving an information query request sent by the server, wherein the information query request is used to obtain device information of the terminal device; The acquired device information is returned to the server, where the device information is encrypted based on the first encryption information, and the device information also includes verification information, so that the server verifies the verification information. If the verification information passes the verification, the target data is sent to the terminal device.
10. The method according to claim 7, characterized in that The generating the second encrypted information according to the device information and the first encrypted information includes: The device information is used as a derivation parameter, and the second encrypted information is generated based on the first encrypted information according to a preset derivation algorithm.
11. A data transmission device, characterized in that: Applied to a server, the device comprises: A first acquisition module, used to acquire device information of a terminal device; A first generating module, configured to generate second encrypted information according to the device information and first encrypted information, wherein the first encrypted information is encrypted information preset between the terminal device and the server; The first encryption module is used to encrypt target data according to the second encryption information and send the target data to the terminal device, wherein the target data is the data that the server currently needs to send to the terminal device.
12. A data transmission device, characterized in that: Applied to a terminal device, the device comprises: a first receiving module, configured to receive target data sent by a server, wherein the target data is encrypted by second encryption information generated by the server based on device information of the terminal device and first encryption information, wherein the first encryption information is encryption information preset between the terminal device and the server; A second acquisition module, used to acquire device information of the terminal device; A second generating module, configured to generate the second encrypted information according to the device information and the first encrypted information; The first decryption module is used to decrypt the target data according to the second encryption information.
13. A server, characterized in that: The server comprises a processor and a memory, wherein a computer program is stored in the memory, and the computer program is executed by the processor to implement the data transmission method according to any one of claims 1 to 6.
14. A terminal device, characterized in that: The terminal device includes a processor and a memory, wherein the memory stores a computer program, and the computer program is executed by the processor to implement the data transmission method according to any one of claims 7 to 10.
15. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is executed by a processor to implement the data transmission method according to any one of claims 1 to 6 or 7 to 10.