Data transmission method and system
By using the AES encryption algorithm and SHA128 module in the data transmission system to encrypt the header information of H264 encoded data, the target summary information is generated, and the problem of data leakage and tampering during data transmission is solved, and data security and uniqueness are achieved. , which improves transmission security and efficiency.
Patent Information
- Application Number
- CN202010873438.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-26
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2040-08-26
AI Technical Summary
The prior art has problems of data leakage and tampering during data transmission, especially under the H264 encoding protocol, when data is illegally intercepted, information leakage may be caused and the security performance of the receiving device may be affected.
By establishing an encryption module between the sending device and the receiving device, encrypting the original header information using the AES encryption algorithm and the SHA128 module, generating the target digest information, and decrypting the private key at the receiving device side, ensuring the uniqueness of the data and security to avoid illegal interception and tampering.
Effectively prevent data leakage and tampering, ensure that the receiving device can only decode the data sent by the sending device, improve the security and uniqueness of data transmission, reduce the encryption processing time, and avoid transmission delay.
Smart Images

Figure CN112104874B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of electronic information technology, and in particular to a data transmission method and system. Background Art
[0002] With the advancement of technology, it is possible to transmit video data remotely through the network. The principle is: after encoding the image data collected by the sending device, transmit it to the receiving device for decoding and display. In the encoding and decoding process, we use. In the prior art, the above data transmission is based on the H264 encoding protocol, which is an open source encoding and decoding protocol; the sending device collects a frame of data and then performs H264 encoding, and sends it to the receiving device for decoding and display. During the transmission process, if the data transmission channel is illegally intercepted by others, the data will be maliciously intercepted and information leakage will occur. This problem exists even if the vgtp method is used. Or the intercepted transmission channel TCP / IP data is cracked, and then the H264 code stream of other image data is sent to the receiving device, then the receiving device will also decode and display it, because they are all code streams in the H264 encoding format. Not only can the receiving device not obtain the correct image, but also the maliciousness of the image data will affect the security performance of the receiving device. Summary of the invention
[0003] The embodiment of the present disclosure provides a data transmission method and system, which can solve the problem of data leakage and tampering during data transmission. The technical solution is as follows:
[0004] According to a first aspect of an embodiment of the present disclosure, a data transmission system is provided, the system comprising: a sending device and a receiving device, the sending device and the receiving device are connected,
[0005] The sending device is used to obtain an original code stream, where the original code stream is a code stream generated after the original frame image is encoded and processed, and the original code stream includes original header information and image information;
[0006] When the original code stream contains an I frame, the original header information is encrypted, and target summary information is obtained according to the encrypted original header information;
[0007] Generate a target code stream according to the target summary information, the encrypted original header information and the image information, and send the target code stream to a receiving device;
[0008] The receiving device is used to receive the target code stream sent by the sending device, and the target code stream is a code stream generated after the original frame image is encoded;
[0009] When the original frame image is an I frame, the encrypted original header information, target summary information, and image information in the target code stream are obtained, and according to a preset calculation rule, preset summary information corresponding to the target header information is obtained, where the target summary information is generated by the sending device according to the encrypted original header information;
[0010] When the target summary information is consistent with the preset summary information, the original frame image is obtained according to the encrypted original header information and the image information.
[0011] In one embodiment, the sending device in the system includes a first encryption module, and the receiving device includes a second encryption module:
[0012] The first encryption module is used to obtain a first encryption password and a public key sent by the receiving device, wherein the first encryption password is set according to at least the following information: a machine code, address information, and time information;
[0013] Encrypt the first encrypted password according to the public key to generate a second encrypted password, and send the second encrypted password to the receiving device;
[0014] The second encryption module is used to obtain a public key and a private key, and send the public key to a sending device;
[0015] Furthermore, when the second encrypted password sent by the sending device is received, the second encrypted password is decrypted using the private key to obtain the first encrypted password.
[0016] In one embodiment, the receiving device in the system further includes a computing module, a first encryption module, a reassembly module and a decryption module, wherein the reassembly module is connected to the first encryption module and the decryption module respectively.
[0017] The calculation module is used to obtain preset summary information according to the encrypted original header information;
[0018] The first encryption module is used to decrypt the encrypted original header information according to the first encryption password to obtain the original header information when the target summary information is consistent with the preset summary information;
[0019] The reorganization module is used to obtain original header information and image information;
[0020] Arrange the original header information and image information according to a preset arrangement and combination to generate an original code stream;
[0021] The decoding module is used to decode the original code stream according to a preset decoding rule to obtain the original frame image.
[0022] In one embodiment, the sending device in the system further includes a first encryption module, a calculation module, a reassembly module and a sending module, wherein the reassembly module is connected to the first encryption module and the sending module respectively.
[0023] The first encryption module is used to obtain a first encryption algorithm and a first encryption password, the first encryption algorithm includes an AES encryption algorithm, and the first encryption password is set according to at least the following information: a machine code, MAC address information, and time information;
[0024] Encrypting the original header information according to the first encryption algorithm and the first encryption password to generate the encrypted original header information;
[0025] Obtain the length of the encrypted original header information by calculating through a preset algorithm;
[0026] The calculation module is used to obtain target summary information according to the encrypted original header information;
[0027] The reassembly module is used to obtain the encrypted original header information, the target summary information, the length and the image information;
[0028] According to a preset arrangement rule, the encrypted original header information, the target summary information, the length and the image information are combined to generate a target code stream, wherein the image information is not encrypted;
[0029] The sending module is used to send the target code stream to the receiving device.
[0030] According to a second aspect of an embodiment of the present disclosure, a data transmission method is provided, which is applied to a sending device, and the method includes:
[0031] Obtaining an original code stream, where the original code stream is a code stream generated after the original frame image is encoded, and the original code stream includes original header information and image information;
[0032] When the original frame image is an I frame, the original header information is encrypted, and the target summary information is obtained according to the encrypted original header information;
[0033] A target code stream is generated according to the target summary information, the encrypted original header information and the image information, and is sent to a receiving device.
[0034] According to a third aspect of an embodiment of the present disclosure, a data transmission method is provided, which is applied to a receiving device, and the method includes:
[0035] Obtaining a target code stream, which is a code stream generated after the original frame image is encoded;
[0036] When the original frame image is an I frame, the encrypted original header information, target summary information, and image information in the target code stream are obtained, and according to a preset calculation rule, preset summary information corresponding to the target header information is obtained, where the target summary information is generated by the sending device according to the encrypted original header information;
[0037] When the target summary information is consistent with the preset summary information, the original frame image is obtained according to the encrypted original header information and the image information.
[0038] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0040] Figure 1 is a flow chart of a data transmission method provided by an embodiment of the present disclosure;
[0041] Figure 2 is a schematic diagram of a reorganization format in a data transmission method provided by an embodiment of the present disclosure;
[0042] Figure 3 This is a process of a data transmission method provided by an embodiment of the present disclosure Figure 2 ;
[0043] Figure 4 is a structural diagram of a data transmission system provided by an embodiment of the present disclosure;
[0044] Figure 4a is a structural diagram of a sending device in a data transmission system provided by an embodiment of the present disclosure;
[0045] Figure 4b is a structural diagram of a receiving device in a data transmission system provided by an embodiment of the present disclosure;
[0046] Figure 5 It is a logical schematic diagram of a data transmission system provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0047] 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 embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0048] The present disclosure provides a data transmission method, such as Figure 1 As shown, the data transmission method is applied to a sending device, which may be a terminal device or a network server, etc. The method comprises the following steps:
[0049] 101. Obtain the target bitstream.
[0050] The original code stream is a code stream generated after the original frame image is encoded, and the original code stream includes original header information and image information.
[0051] 102. When the original code stream includes an I frame, encrypt the original header information, and obtain target summary information according to the encrypted original header information.
[0052] Obtain a first encryption algorithm and a first encryption password, the first encryption algorithm comprising an Advanced Encryption Standard (AES) encryption algorithm, the first encryption password being set at least according to the following information: a machine code, MAC address information, and current time information;
[0053] The original header information is encrypted according to the first encryption algorithm and the first encryption password to generate the target header information.
[0054] In the method provided by the present disclosure, when the original code stream does not include an I frame, target coded data is directly generated.
[0055] In the specific implementation of the method provided by the present disclosure, the data encryption process can be performed through the AES module and the SHA128 module. The header data is first encrypted through the AES module, and then the digest is calculated using SHA128. Because the time consumption of the AES encryption algorithm increases with the increase of the encrypted data, the main reason for calculating the digest of SHA128 (SHA1 Secure Hash Algorithm 1, Chinese name: secure hash algorithm) is that the digest is only 128 bits, the encryption and decryption time consumption is small, and it is fixed.
[0056] The method provided in the present disclosure calculates the corresponding digest of the encrypted header information in order to facilitate the receiving device to determine whether the encrypted header information has been tampered with during decryption, and decrypt it if it has not been tampered with.
[0057] 103. Generate a target code stream according to the target summary information, the encrypted original header information and the image information.
[0058] The method provided in the present disclosure generates a target bitstream, comprising:
[0059] Obtain the length of the encrypted original header information by calculating through a preset algorithm;
[0060] According to a preset arrangement rule, the encrypted original header information, the summary information, the length and the image information are combined to generate a target code stream, wherein the target image information is not encrypted.
[0061] like Figure 2 As shown, the format for reorganizing the original code stream data includes: the encrypted original header information and target summary information, length and image information.
[0062] In the prior art, the security of the transmission process is improved by encrypting the code stream data. However, since the code stream data is too large, it will take a lot of time to encrypt the entire code stream data, which will increase the transmission delay and be detrimental to the real-time display. Therefore, the encryption method provided by the present invention utilizes the characteristic that the reference frame must be obtained when decoding the code stream, and only processes the reference frame, specifically: encrypting the header information of the reference frame, while not processing the actual encoded data. In this way, the amount of encrypted data will be greatly reduced, reducing the encryption processing time, and at the same time ensuring that the encrypted data on the sending device side cannot be decoded and displayed even if it is intercepted, and at the same time ensuring that the data decoded and displayed on the receiving device side must be the data sent by the sending device side.
[0063] The data transmission method provided by the embodiment of the present disclosure is applied to a sending device. After the sending device obtains the original code stream data generated according to the original frame image, the sending device analyzes the original code stream data. When the original frame image in the original code stream is an I frame, the original header information is encrypted, and target summary information is obtained according to the encrypted original header information. According to the target summary information, the encrypted original header information and the image information, a target code stream is generated and sent to a receiving device.
[0064] The data transmission method provided by the disclosed embodiment ensures that the data decoded and displayed by the receiving device can only be the data code stream sent by the sending device through encryption processing of the original header information, thereby ensuring the safe transmission of the data code stream; at the same time, it can also ensure the uniqueness of the code stream data, so that the receiving device does not decode and display other H264 code streams, avoiding the decoding and display of other H264 format image data code streams after the transmission channel is intercepted. Furthermore, even if the code stream data is maliciously intercepted during the transmission process, other devices cannot encode and restore the encrypted header information, ensuring that the information is not leaked.
[0065] Implementation II
[0066] Based on the above Figure 1Corresponding to the data transmission method provided in the embodiment, another embodiment of the present disclosure provides a data transmission method, which can be applied to a decoding device, for example, the receiving device can also be a terminal device or a network server, etc. Figure 3 As shown, the data transmission method provided in this embodiment includes the following steps:
[0067] 301. Obtain target bitstream.
[0068] The target code stream is a code stream generated after the original frame image is encoded.
[0069] After obtaining the original code stream, the method provided by the present disclosure determines whether the original frame image is an I frame according to a preset rule;
[0070] If the original frame image in the original code stream is not an I frame, the decoding module is directly called to decode the target code stream and display the decoded image.
[0071] 302. When the original frame image is an I frame, the encrypted original header information, target summary information, and image information in the target code stream are obtained, and according to a preset calculation rule, preset summary information corresponding to the target header information is obtained.
[0072] In the method provided by the present disclosure, the target summary information is generated by the sending device according to the encrypted original header information;
[0073] When the original code stream includes an I frame, the target summary information and the encrypted original header information in the original code stream are obtained.
[0074] The method provided by the present disclosure can analyze the original code stream according to the encrypted and reorganized I frame header format, and intercept the target summary information and the encrypted original header information in the original code stream.
[0075] According to the preset calculation rules, the preset summary information corresponding to the original header information is obtained.
[0076] The method provided by the present disclosure can obtain preset summary information corresponding to the original header information through the SHA128 module; the SHA128 module is generated based on the SHA1 (SHA1 Secure Hash Algorithm 1, Chinese name: secure hash algorithm) encryption algorithm.
[0077] By processing the preset summary information before decryption, the waste of data computing resources caused by decrypting the target code stream can be avoided, because the time consumed by the AES encryption algorithm increases with the increase of encrypted data, while the calculation of the summary information has a data volume of only 128 bits, so encryption and decryption takes a short time and is fixed.
[0078] 303. When the target summary information is consistent with the preset summary information, the original frame image is obtained according to the encrypted original header information and the image information.
[0079] The method provided in the present disclosure obtains the original frame image by first decrypting the encrypted original header information, and then generating the original frame image according to the original header information and image information, specifically including:
[0080] Obtaining the encrypted first encryption password sent by the sending device;
[0081] Decrypting the first encrypted password using a second encryption algorithm, wherein the second encryption algorithm includes an AES encryption algorithm;
[0082] Decrypting the encrypted original header information according to the first encryption password to obtain the original header information;
[0083] Arrange the original header information and image information according to a preset arrangement and combination to generate an original code stream;
[0084] The original code stream is decoded according to a preset decoding rule to obtain an original frame image.
[0085] The method provided by the present disclosure further includes: when the target summary information is inconsistent with the preset summary information, determining that the target header information does not meet the preset requirement;
[0086] When the target header information does not meet the preset requirements, a prompt message is generated and sent to the sending device, and the prompt message is used to remind that the target code stream does not meet the preset requirements.
[0087] The method provided by the present invention can determine whether the encrypted header information has been tampered with during the transmission process by determining whether the target summary information is consistent with the preset summary information. Only when it is determined that the header information has not been tampered with will the subsequent decryption and decoding processes be performed, thereby not only achieving the security of data transmission, but also improving the efficiency of data processing, avoiding the waste of system performance caused by determining whether the data has been tampered with after decryption.
[0088] The data transmission method provided by the embodiment of the present disclosure is applied to a receiving device. When the receiving device obtains a target code stream, it first determines whether the image frame in the target code stream is an I frame. If it is an I frame, it further obtains the encrypted original header information and target summary information in the target code stream, and calculates the preset summary information corresponding to the encrypted original header information according to a preset calculation rule. When the target summary information and the preset summary information are consistent, it is determined that the target code stream has not been attacked or tampered with during the data transmission process, and the target code stream can be decoded and processed to obtain the original image frame. The method provided by the present disclosure is applied to a receiving device, and can detect the security of data after transmission, and can also improve the efficiency of data decoding.
[0089] Implementation Three
[0090] Based on the above Figure 1 and Figure 3 The data transmission method described in the corresponding embodiment is as follows: an embodiment of the system of the present disclosure, which can be used to execute the embodiment of the method of the present disclosure.
[0091] The present disclosure provides a data transmission system. Figure 4 As shown, the data transmission system 40 includes:
[0092] A sending device 401 and a receiving device 402, wherein the sending device 401 and the receiving device 402 are connected.
[0093] The sending device 401 is used to obtain an original code stream, where the original code stream is a code stream generated after the original frame image is encoded, and the original code stream includes original header information and image information;
[0094] When the original code stream contains an I frame, the original header information is encrypted, and target summary information is obtained according to the encrypted original header information;
[0095] Generate a target code stream according to the target summary information, the encrypted original header information and the image information, and send the target code stream to the receiving device 402;
[0096] The receiving device 402 receives a target code stream sent by the sending device, where the target code stream is a code stream generated after the original frame image is encoded;
[0097] When the original frame image is an I frame, the encrypted original header information, target summary information, and image information in the target code stream are obtained, and according to a preset calculation rule, preset summary information corresponding to the target header information is obtained, where the target summary information is generated by the sending device according to the encrypted original header information;
[0098] When the target summary information is consistent with the preset summary information, the original frame image is obtained according to the encrypted original header information and the image information.
[0099] In an optional embodiment, the sending device 401 in the system 40 provided by the present disclosure includes a first encryption module 4011, and the receiving device 402 includes a second encryption module:
[0100] The first encryption module is used to obtain a first encryption password and a public key sent by the receiving device 402, wherein the first encryption password is set according to at least the following information: a machine code, address information, and time information;
[0101] According to the public key, the first encrypted password is encrypted to generate a second encrypted password, and the second encrypted password is sent to the receiving device 402;
[0102] The second encryption module is used to obtain a public key and a private key, and send the public key to a sending device;
[0103] Furthermore, when the second encrypted password sent by the sending device is received, the second encrypted password is decrypted using the private key to obtain the first encrypted password.
[0104] like Figure 5 As shown, the data processing flow of the first encryption module and the second encryption module is further described:
[0105] When the data transmission system is started, the receiving device 402 establishes a network connection with the sending device 401; the sending device generates a password required for encrypting data, which is a first encryption password. The specific first encryption password may be a dynamic password PW, which is composed of a machine code, a MAC address and a current time, thereby increasing the difficulty of cracking;
[0106] The receiving device 402 generates a set of encryption keys: a public key and a private key through the second encryption module. The specific second encryption module can be an RSA encryption module; the receiving device 402 sends the public key to the sending device. RSA is an asymmetric encryption. After the receiving device 402 generates the private key and the public key, it only needs to properly preserve the private key of the receiving device 402. Even if the public key sent to the sending device is lost, the security of the entire process will not be affected.
[0107] After receiving the public key sent by the receiving device 402, the sending device 401 encrypts the generated password PW through the first encryption module to generate an encrypted password EPW, which is the second encrypted password. The specific first encryption module may be an AES encryption module, and the second encrypted password is sent to the receiving device 402;
[0108] The receiving device 402 receives the second encrypted password sent by the sending device 401, decrypts the second encrypted password through the RSA encryption module and the private key, restores the encrypted first encrypted password, and saves the first encrypted password for decryption of the code stream information.
[0109] like Figure 4a As shown, in an optional embodiment, the sending device 401 in the system 40 provided by the present disclosure further includes a first encryption module 4011, a calculation module 4012, a reorganization module 4013 and a sending module 4014, and the reorganization module 4013 is connected to the first encryption module 4011 and the sending module 4014 respectively.
[0110] The first encryption module 4011 is used to obtain a first encryption algorithm and a first encryption password, the first encryption algorithm includes an AES encryption algorithm, and the first encryption password is set according to at least the following information: a machine code, MAC address information, and time information;
[0111] Encrypting the original header information according to the first encryption algorithm and the first encryption password to generate the encrypted original header information;
[0112] And obtain the length corresponding to the encrypted original header information by calculating through a preset algorithm;
[0113] The calculation module 4012 is used to obtain target summary information according to the encrypted original header information. The specific calculation module may be a SHA128 module to obtain preset summary information corresponding to the original header information; the SHA128 module is generated based on the SHA1 (SHA1 Secure Hash Algorithm 1, Chinese name: secure hash algorithm) encryption algorithm;
[0114] The reassembly module 4013 is used to obtain the encrypted original header information, the target summary information, the length and the image information;
[0115] According to a preset arrangement rule, the encrypted original header information, the target summary information, the length and the image information are combined to generate a target code stream, wherein the image information is not encrypted;
[0116] The sending module 4014 is used to send the target code stream to the receiving device 402.
[0117] like Figure 4b As shown, in an optional embodiment, the receiving device 402 in the system 40 provided by the present disclosure further includes a computing module 4022, a first encryption module 4023, a reassembly module 4024 and a decryption module 4025, and the reassembly module 4024 is connected to the first encryption module 4023 and the decryption module 4025, respectively.
[0118] The calculation module 4022 is used to obtain preset summary information according to the encrypted original header information. The specific calculation module may be a SHA128 module to obtain the preset summary information corresponding to the original header information; the SHA128 module is generated based on the SHA1 (SHA1 Secure Hash Algorithm 1, Chinese name: secure hash algorithm) encryption algorithm;
[0119] The first encryption module 4023 is used to decrypt the encrypted original header information according to the first encryption password to obtain the original header information when the target summary information is consistent with the preset summary information;
[0120] The reorganization module 4024 is used to obtain original header information and image information;
[0121] Arrange the original header information and image information according to a preset arrangement and combination to generate an original code stream;
[0122] The decoding module 4025 is used to decode the original code stream according to a preset decoding rule to obtain an original frame image.
[0123] The data transmission system provided by the embodiment of the present disclosure includes a sending device and a receiving device. After the sending device obtains the original code stream data generated according to the original frame image, the sending device analyzes the original code stream data. When the original frame image in the original code stream is an I frame, the original header information is encrypted, and target summary information is obtained according to the encrypted original header information. According to the target summary information, the encrypted original header information and the image information, a target code stream is generated and sent to the receiving device. When the receiving device obtains the target code stream, it is first determined whether the image frame in the target code stream is an I frame. If it is an I frame, the encrypted original header information and target summary information in the target code stream are further obtained. According to a preset calculation rule, the preset summary information corresponding to the encrypted original header information is calculated. When the target summary information is consistent with the preset summary information, it is determined that the target code stream has not been attacked or tampered with during the data transmission process, and the original image frame can be obtained by decoding according to the target code stream.
[0124] The system provided by the present disclosure can improve the reliability of data in code stream transmission, prevent the transmission process or the device from being affected by malicious attacks, and also ensure that the transmitted data is unique, that is, the data decoded and displayed by the receiving device is the target code stream data encoded by the sending device, rather than the data tampered with in the middle.
[0125] Based on the above Figure 1 and Figure 3Corresponding to the data transmission method described in the embodiment, the embodiment of the present disclosure also provides a computer-readable storage medium, for example, a non-temporary computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. The storage medium stores computer instructions for executing the above Figure 1 and Figure 3 The data transmission method described in the corresponding embodiment will not be repeated here.
[0126] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
Claims
1. A data transmission method, characterized in that: Applied to a sending device, the method comprises: Obtaining an original code stream, wherein the original code stream is a code stream generated after the original frame image is encoded, and the original code stream includes original header information and image information; When the original frame image is an I frame, encrypting the original header information, and acquiring target summary information according to the encrypted original header information, the original header information belonging to the original code stream; Among them, the target summary information is generated, including: Obtaining a first encryption algorithm and a first encryption password, wherein the first encryption algorithm includes an AES encryption algorithm, and the first encryption password is set according to at least the following information: a machine code, address information, and time information; Encrypting the original header information according to the first encryption algorithm and the first encryption password to generate the encrypted original header information; A target code stream is generated according to the target summary information, the encrypted original header information and the image information, and is sent to a receiving device.
2. The method according to claim 1, characterized in that The generating of the target bitstream comprises: Obtain the length of the encrypted original header information by calculating using a preset algorithm; According to a preset arrangement rule, the encrypted header information, the target summary information, the length and the image information are combined to generate a target code stream, wherein the image information is not encrypted.
3. A data transmission method, characterized in that: Applied to a receiving device, the method comprises: Obtaining a target code stream, wherein the target code stream is a code stream generated after the original frame image is encoded; When the original frame image is an I frame, the encrypted original header information, target summary information, and image information in the target code stream are obtained, and according to a preset calculation rule, preset summary information corresponding to the target header information is obtained, where the target summary information is generated by the sending device according to the encrypted original header information, and the original header information belongs to the original code stream; When the target summary information is consistent with the preset summary information, acquiring the original frame image according to the encrypted original header information and the image information; Wherein, the obtaining of the original frame image comprises: Acquire a first encryption algorithm and a first encryption password, wherein the first encryption algorithm includes an AES encryption algorithm, and the first encryption password is acquired by decrypting a second encryption password sent by the sending device; Decrypting the encrypted original header information according to the first encryption password and the first encryption algorithm to obtain the original header information; Arranging the original header information and the image information according to a preset arrangement and combination to generate the original code stream; The original code stream is decoded according to a preset decoding rule to obtain an original frame image.
4. The method according to claim 3, characterized in that The method further comprises: When the target summary information is inconsistent with the preset summary information, it is determined that the original header information does not meet the preset requirement, and prompt information is generated and sent to the sending device, where the prompt information is used to remind that the target code stream does not meet the preset requirement.
5. A data transmission system, characterized in that: The system includes a sending device and a receiving device, wherein the sending device and the receiving device are connected. A sending device, used to obtain an original code stream, wherein the original code stream is a code stream generated after the original frame image is encoded, and the original code stream includes original header information and image information; When the original code stream includes an I frame, encrypting the original header information, and acquiring target summary information according to the encrypted original header information, the original header information belonging to the original code stream; Generate a target code stream according to the target summary information, the encrypted original header information and the image information, and send the target code stream to a receiving device; Wherein, the sending device includes a first encryption module: The first encryption module is used to obtain a first encryption password and a public key sent by the receiving device, wherein the first encryption password is set according to at least the following information: a machine code, address information, and time information; Encrypting the first encrypted password according to the public key to generate a second encrypted password, and sending the second encrypted password to a receiving device; The first encryption module is used to obtain a first encryption algorithm and a first encryption password, the first encryption algorithm includes an AES encryption algorithm, and the first encryption password is set according to at least the following information: a machine code, MAC address information, and time information; Encrypting the original header information according to the first encryption algorithm and the first encryption password to generate the encrypted original header information; The receiving device is used to receive the target code stream sent by the sending device, and the target code stream is a code stream generated after the original frame image is encoded; When the original frame image is an I frame, the encrypted original header information, target summary information, and image information in the target code stream are obtained, and according to a preset calculation rule, preset summary information corresponding to the target header information is obtained, where the target summary information is generated by the sending device according to the encrypted original header information; When the target summary information is consistent with the preset summary information, the original frame image is acquired according to the encrypted original header information and the image information.
6. The system according to claim 5, characterized in that The receiving device comprises a second encryption module: The second encryption module is used to obtain a public key and a private key, and send the public key to a sending device; Furthermore, when the second encrypted password sent by the sending device is received, the second encrypted password is decrypted using the private key to obtain the first encrypted password.
7. The system according to claim 6, characterized in that The sending device further includes a first encryption module, a calculation module, a reassembly module and a sending module, wherein the reassembly module is connected to the first encryption module and the sending module respectively. The first encryption module is used to Obtain the length of the encrypted original header information by calculating using a preset algorithm; The calculation module is used to obtain target summary information according to the encrypted original header information; The reassembly module is used to obtain the encrypted header information, the target summary information, the length and the image information; According to a preset arrangement rule, the encrypted header information, the target summary information, the length and the image information are combined to generate a target code stream, wherein the image information is not encrypted; The sending module is used to send the target code stream to a receiving device.
8. The system according to claim 6, characterized in that The receiving device further comprises a calculation module, a first encryption module, a reassembly module and a decryption module, wherein the reassembly module is connected to the first encryption module and the decryption module respectively. The calculation module is used to obtain preset summary information according to the encrypted original header information; The first encryption module is used to decrypt the encrypted original header information according to the first encryption password to obtain the original header information when the target summary information is consistent with the preset summary information; The reorganization module is used to obtain original header information and image information; Arranging the original header information and image information according to a preset arrangement and combination to generate an original code stream; The decryption module is used to decode the original code stream according to a preset decoding rule to obtain the original frame image.
