Video transmission system and method
By encrypting the video data using a key generated by combining a random password with an encryption salt in the video transmission system, and transmitting it based on the data retransmission mechanism and network state analysis, the problem of insufficient security and reliability of video transmission in the prior art is solved, and high security and high reliability video transmission is achieved.
Patent Information
- Application Number
- CN202411680029.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-03-28
AI Technical Summary
Existing video transmission systems have shortcomings in terms of security and reliability, especially in industries with high security levels. Ordinary protocols cannot meet the confidentiality requirements, and because of the open source technology, they are easily cracked and have low security.
It provides a video transmission system, which encrypts the video data by generating a key combined with a random password and an encryption salt at the sending end, encrypts and decrypts using a dictionary table, and uses a dictionary table to perform encrypted video media packets through a communication channel based on the data retransmission mechanism and network state analysis, and decrypts them through the communication channel.
Improve the security and reliability of video transmission, prevent unauthorized access and tampering, ensure the integrity and authenticity of video data, minimize data loss and delay, and improve the reliability and real-time nature of communication.
Smart Images

Figure CN119729141A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communications, and in particular to a video transmission system and method. Background Art
[0002] At present, in large-scale video emergency command projects in China, equipment networking has become the development trend of video emergency command systems. Video transmission, as a bridge between the scene and the command center, can quickly and accurately transmit the real-time situation on the scene to the commander. However, some industries with higher security levels have requirements for the confidentiality of video transmission, and ordinary protocols cannot meet their needs. In addition, since the technology is fully open source, it is easy to be cracked and has low security. Summary of the invention
[0003] The main purpose of this application is to provide a video transmission system and method, aiming to solve the technical problem of how to improve the security and reliability of video transmission.
[0004] To achieve the above object, the present application provides a video transmission system, the video transmission system comprising: a transmitting end and a receiving end;
[0005] The sending end is used to generate a key by combining a random password with an encryption salt;
[0006] The transmitting end is further used to encrypt the video data based on the encryption algorithm by using the key and the dictionary table to obtain an encrypted video media packet;
[0007] The transmitting end is further used to send the encrypted video media packet to the receiving end through a communication channel based on a data retransmission mechanism and network status analysis;
[0008] The receiving end is used to decrypt the encrypted video media package.
[0009] Preferably, the sending end is further used to send the encrypted video media package to the receiving party through the communication channel based on the timeout retransmission time threshold and the upper limit of the number of retransmissions of the data retransmission mechanism;
[0010] The transmitting end is further used to mark the encrypted video media packet that has been successfully sent according to the confirmation response of the receiving party based on the sliding window protocol;
[0011] The transmitting end is further used to simultaneously send multiple encrypted video media packets to the receiving end by moving a sliding window corresponding to the encrypted video data;
[0012] The sending end is also used to adjust the sending parameters of the encrypted video media packet based on network status analysis.
[0013] Preferably, the transmitting end is further used to calculate the round trip time based on the network status analysis according to the sending time of the encrypted video media packet and the return time of the confirmation response;
[0014] The transmitting end is further used to calculate the timeout retransmission time according to the round-trip time, and obtain the packet loss rate by determining the number of successfully sent data and the number of unsuccessfully sent data;
[0015] The sending end is further used to adjust the sending parameters of the encrypted video media packet according to the timeout retransmission time and the packet loss rate.
[0016] Preferably, the sending end is further used to send the encrypted video media package to the receiving end through a communication channel;
[0017] The transmitting end is further configured to resend the data packet based on a data retransmission mechanism and accumulate the number of retransmissions if no confirmation response is received from the receiving end within a timeout retransmission time threshold;
[0018] The sending end is further configured to abandon sending the encrypted video media packet if the confirmation response is not received when the number of retransmissions reaches an upper limit of the number of retransmissions.
[0019] Preferably, the transmitting end is further used to construct a dictionary table containing encryption mapping relationships according to the encryption requirements and encryption priority of the video data, and use the dictionary table as an encryption and decryption retrieval library;
[0020] The sending end is also used to replace the characters or character strings in the video data with corresponding encrypted characters or encrypted character strings in the encryption and decryption retrieval library.
[0021] Preferably, the transmitting end is further used to unpack the video data based on the original standard codec to obtain the part to be encrypted;
[0022] The transmitting end is further used to encrypt the to-be-encrypted part by using the key and the dictionary table based on an encryption algorithm to obtain encrypted video data;
[0023] The sending end is also used to encapsulate the encrypted video data into an encrypted video media packet.
[0024] Furthermore, to achieve the above-mentioned purpose, the present application also provides a video transmission method, which is applied to a video transmission system, the system comprising: a transmitting end and a receiving end; the method comprises:
[0025] The sending end generates a key by combining a random password with an encryption salt;
[0026] The sending end encrypts the video data based on the encryption algorithm by using the key and the dictionary table to obtain an encrypted video media packet;
[0027] The sending end sends the encrypted video media packet to the receiving end through a communication channel based on a data retransmission mechanism and network status analysis;
[0028] The receiving end decrypts the encrypted video media packet.
[0029] Preferably, the step of sending the encrypted video media package to the receiving end through a communication channel based on a data retransmission mechanism and network status analysis by the sending end specifically includes:
[0030] The sending end sends the encrypted video media packet to the receiving end through the communication channel based on the timeout retransmission time threshold and the upper limit of the retransmission number of the data retransmission mechanism;
[0031] The sending end marks the encrypted video media packet that has been successfully sent according to the confirmation response of the receiving party based on the sliding window protocol;
[0032] The sending end simultaneously sends a plurality of encrypted video media packets to the receiving end by moving a sliding window corresponding to the encrypted video data;
[0033] The sending end adjusts the sending parameters of the encrypted video media packet based on network status analysis.
[0034] Preferably, the step of adjusting the transmission parameters of the encrypted video media packet by the transmitting end based on the network status analysis specifically includes:
[0035] The transmitting end calculates the round trip time based on the network status analysis and the sending time of the encrypted video media packet and the return time of the confirmation response;
[0036] The sending end calculates the timeout retransmission time according to the round-trip time, and obtains the packet loss rate by determining the number of successfully sent data and the number of unsuccessfully sent data;
[0037] The sending end adjusts the sending parameters of the encrypted video media packet according to the timeout retransmission time and the packet loss rate.
[0038] Preferably, the step of the sending end simultaneously sending a plurality of encrypted video media packets to the receiving end by moving a sliding window corresponding to the encrypted video data specifically comprises:
[0039] The sending end sends the encrypted video media package to the receiving end through the communication channel;
[0040] The sending end resends the data packet based on the data retransmission mechanism, and accumulates the number of retransmissions if the sending end does not receive a confirmation response from the receiving end within the timeout retransmission time threshold;
[0041] The sending end abandons the encrypted video media packet if the confirmation response is not received when the number of retransmissions reaches the upper limit of the number of retransmissions.
[0042] In the present application, the sending end generates a key by combining a random password with an encryption salt. The sending end encrypts the video data based on an encryption algorithm by using a key and a dictionary table to obtain an encrypted video media package. The sending end sends the encrypted video media package to the receiving end through a communication channel based on a data retransmission mechanism and network status analysis, and the receiving end decrypts the encrypted video media package; thereby improving the security of video transmission between the sending end and the receiving end, preventing unauthorized access and tampering, and ensuring the integrity and authenticity of the video data, minimizing data loss and delay, and improving the reliability and real-time performance of communications. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 This is a structural block diagram of the first embodiment of the video transmission system of the present application;
[0044] Figure 2 This is a schematic diagram of the sliding window operation;
[0045] Figure 3 It is a schematic diagram of the operation of the data retransmission mechanism;
[0046] Figure 4 This is a flow chart of the first embodiment of the video transmission method of the present application;
[0047] Figure 5 This is a flow chart of the second embodiment of the video transmission method of the present application.
[0048] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0049] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0050] Reference Figure 1 , Figure 1 The structure block diagram of the first embodiment of the video transmission system of the present application is as follows. The video transmission system comprises: a transmitting end 10 and a receiving end 20.
[0051] The sending end 10 is used to generate a key by combining a random password with an encryption salt.
[0052] It should be noted that the sending end can be a system including a video acquisition device, a video encoder, a communication terminal or a gateway, and this embodiment does not limit this; a random password is a randomly generated password used to increase the complexity and security of the key; an encryption salt is a random data used to generate a key in combination with a password, and its length and complexity can be adjusted according to actual needs; a key is a secret code used to encrypt and decrypt data.
[0053] It should be understood that a sufficiently long and complex random password is generated using a secure random number generator, which may be a functional module in a programming language. The generated random password and the encryption salt are concatenated or combined according to a certain rule.
[0054] The sending end 10 is further configured to encrypt the video data based on an encryption algorithm by using the key and the dictionary table to obtain an encrypted video media package.
[0055] It should be noted that the dictionary table defines the correspondence between the original characters or character strings and the encrypted characters or encrypted character strings.
[0056] It is understandable that, according to the sensitivity and encryption requirements of the video data, a suitable encryption algorithm is selected, such as the Advanced Encryption Standard (AES), the RSA encryption algorithm, etc. Then, after the video data is preprocessed (format conversion, compression, etc.), the video data is encrypted using the selected encryption algorithm. During the encryption process, the key is used to generate the ciphertext, and the dictionary table is used to replace or obfuscate certain parts of the video data. Further, the encrypted video data is encapsulated into an encrypted video media package, which may contain the encrypted video data, information about the encryption algorithm, key management information, etc.
[0057] The sending end 10 is also used to send the encrypted video media package to the receiving end through a communication channel based on a data retransmission mechanism and network status analysis.
[0058] It should be noted that the data retransmission mechanism is a method to ensure data integrity and reliability. When data is lost or erroneous, it will be resent. Network status analysis is to monitor and analyze network performance to optimize data transmission. For example, by analyzing indicators such as network delay and packet loss rate, the data transmission rate can be adjusted or a more stable communication channel can be selected.
[0059] It should be understood that before sending the encrypted video media package, it is necessary to evaluate the current network status, including bandwidth, delay, packet loss rate and other indicators, which can be achieved through network monitoring tools or special network analysis software. According to the results of the network status analysis, the most appropriate communication channel is selected for data transmission, which may include different communication methods such as wired network, wireless network, satellite communication, etc.
[0060] In addition, in order to enable the encrypted video media packets to be correctly reassembled and verified in sequence at the receiving end, a unique sequence number needs to be assigned to each encrypted video media packet.
[0061] It is understandable that the encrypted video media packets are sent to the receiving end in sequence through the selected communication channel. Based on the data retransmission mechanism, after successfully receiving each media packet, the receiving end sends an acknowledgement character (ACK) to the sending end, indicating that the media packet has been successfully received.
[0062] The receiving end 20 is used to decrypt the encrypted video media packet.
[0063] It should be noted that the receiving end may be a console of a video surveillance center, a mobile command terminal or other communication terminal, and this embodiment does not impose any limitation on this.
[0064] It should be understood that after receiving the encrypted video media package, the receiving end obtains the same key used by the sending end for encryption through a secure channel (such as a pre-agreed key exchange protocol) or a secure storage mechanism, and determines the same decryption algorithm used by the sending end for encryption. Using the selected decryption algorithm and key, each data block in the encrypted video media package is decrypted block by block. After the decryption process is completed, the receiving end will restore the original, unencrypted video data.
[0065] In addition, it should be noted that before decryption, the receiving end may first perform an integrity check on the encrypted video media packets through a checksum or hash value, and if the encrypted video media packets are sent in sequence, the receiving end needs to reassemble them into a complete video stream according to the sequence number.
[0066] Furthermore, the transmitting end 10 is also used to construct a dictionary table containing encryption mapping relationships according to the encryption requirements and encryption priorities of the video data, and use the dictionary table as an encryption and decryption retrieval library.
[0067] It is understandable that the encryption requirements and encryption priorities of the video data are analyzed by evaluating factors such as the sensitivity of the video content, the security requirements of the transmission environment, and the decryption capabilities of the receiving end. Based on the encryption requirements and priorities, a dictionary table containing encryption mapping relationships is constructed. For example, the dictionary table may replace common words or phrases with complex encrypted strings, or map a specific character set (such as numbers, letters, or special characters) to another set of character sets.
[0068] The constructed dictionary table is stored as an encryption and decryption retrieval library, which is used to find and replace characters or strings during the encryption process and to restore the original data during the decryption process.
[0069] The sending end 10 is also used to replace the characters or character strings in the video data with corresponding encrypted characters or encrypted character strings in the encryption and decryption retrieval library.
[0070] It should be understood that, first, the metadata, subtitles, watermarks or other text information embedded in the video data needs to be read, and then each character or string in the video data is traversed and the corresponding encrypted character or encrypted string is searched in the encryption and decryption retrieval library. If a matching item is found, the character or string is replaced with the encrypted version to generate encrypted video data.
[0071] In this embodiment, the sending end generates a key by combining a random password with an encryption salt. The sending end encrypts the video data based on an encryption algorithm by using a key and a dictionary table to obtain an encrypted video media package. The sending end sends the encrypted video media package to the receiving end through a communication channel based on a data retransmission mechanism and network status analysis, and the receiving end decrypts the encrypted video media package. This improves the security of video transmission between the sending end and the receiving end, prevents unauthorized access and tampering, ensures the integrity and authenticity of the video data, minimizes data loss and delay, and improves the reliability and real-time performance of communications.
[0072] Based on the above Figure 1 The embodiment shown provides a second embodiment of the video transmission system of the present application.
[0073] In this embodiment, the sending end 10 is further used to send the encrypted video media packet to the receiving party through the communication channel based on the timeout retransmission time threshold and the upper limit of the retransmission number of the data retransmission mechanism.
[0074] It is understandable that the data retransmission mechanism sets a timeout retransmission threshold, that is, if the encrypted video media packet sent does not receive confirmation from the receiver within the specified time, it is considered to have failed. At the same time, the data retransmission mechanism also sets an upper limit on the number of retransmissions to limit the number of retransmissions of the same encrypted video media packet to avoid infinite retransmissions that lead to resource waste.
[0075] The sending end 10 is further configured to mark the encrypted video media packet that has been successfully sent according to the confirmation response of the receiving party based on a sliding window protocol.
[0076] It should be noted that the sliding window protocol is a reliable data transmission protocol that allows the sender to send multiple data packets before stopping and waiting for confirmation. At any time, the sender and the receiver maintain a continuous range of sequence numbers of frames (or data packets) allowed to be sent or received.
[0077] The sending end 10 is also used to simultaneously send multiple encrypted video media packets to the receiving end by moving a sliding window corresponding to the encrypted video data.
[0078] It is understandable that after successfully receiving the encrypted video media packet, the receiving end will send a confirmation response to the sending end to indicate that the media packet has been successfully sent and received. The sending end dynamically adjusts the number and order of the encrypted video media packets sent by moving the sliding window corresponding to the encrypted video data according to the confirmation character mark of the receiving end. The size of the sliding window indicates how much buffer the receiving end has available for receiving data, and the sending end can determine how many bytes of data should be sent based on this size.
[0079] For ease of understanding, refer to Figure 2 The data from 32 to 51 are first sent, as shown in the dotted box. After receiving the confirmation response of the data from 32 to 35, the window is moved back, as shown in the solid box.
[0080] The sending end 10 is further used to adjust the sending parameters of the encrypted video media packet based on network status analysis.
[0081] It is understandable that the sender will analyze the current network status in real time or periodically, including key indicators such as bandwidth, delay, packet loss rate, etc., and adjust the sending parameters of the encrypted video media packet based on the results of the network status analysis, such as adjusting the size of the data packet, the sending rate, etc.
[0082] When the network condition is good, the sender may increase the size and sending rate of the data packet; when the network condition is poor, the size and sending rate of the data packet can be reduced. In addition, when receiving large blocks of data, according to the current bandwidth, in order to avoid network congestion and large amounts of packet loss and retransmission, the sending time interval between data packets can be appropriately increased.
[0083] In this embodiment, the sending end sends the encrypted video media packet to the receiving end through the communication channel through the timeout retransmission time threshold and the upper limit of the number of retransmissions based on the data retransmission mechanism. The sending end marks the encrypted video media packet that has been successfully sent according to the confirmation response of the receiving end based on the sliding window protocol. The sending end sends multiple encrypted video media packets to the receiving end at the same time by moving the sliding window corresponding to the encrypted video data. The sending end adjusts the sending parameters of the encrypted video media packet based on network status analysis, thereby improving the throughput and real-time performance of video data transmission, and helping to reduce network congestion and data packet loss.
[0084] In this embodiment, the sending end 10 is further used to calculate the round-trip time based on the network status analysis according to the sending time of the encrypted video media packet and the return time of the confirmation response.
[0085] It is understandable that when the sender sends the encrypted video media packet, it will record the sending time of each media packet. When the receiver successfully receives the media packet and returns a confirmation response, the sender will record the return time of the confirmation response. According to the recorded sending time and the return time of the confirmation response, the round-trip time (Render to Texture, RTT) of each encrypted video media packet is calculated. The round-trip time represents the total time required from the sender sending the media packet to the receiver returning the confirmation response.
[0086] The sending end 10 is further used to calculate the timeout retransmission time according to the round-trip time, and obtain the packet loss rate by determining the number of successfully sent data and the number of unsuccessfully sent data.
[0087] It should be understood that the timeout retransmission time is calculated based on the calculated round-trip time and a preset coefficient (usually referred to as a "timeout factor" or a "retransmission factor").
[0088] It should be noted that the timeout retransmission period is usually set to a multiple of the round-trip time to ensure that in most cases, if a media packet is lost or delayed too much during transmission, the sender can resend the media packet within a reasonable time.
[0089] It is understandable that the packet loss rate is usually expressed as the ratio of the number of media packets that were not successfully sent to the total number of media packets sent. The sender will count the number of encrypted video media packets that were successfully sent and the number of media packets that were not successfully sent (i.e., need to be retransmitted) within a period of time, and calculate the packet loss rate based on the number of statistical data.
[0090] The sending end 10 is further configured to adjust the sending parameters of the encrypted video media packet according to the timeout retransmission time and the packet loss rate.
[0091] It is understandable that the transmission parameters of the encrypted video media packet are dynamically adjusted according to the calculated timeout retransmission time and packet loss rate. If the timeout retransmission time is long and the packet loss rate is high, the sender may reduce the size of the data packet, reduce the transmission rate, or increase the upper limit of the number of retransmissions. If the timeout retransmission time is short and the packet loss rate is low, the sender may increase the size of the data packet, increase the transmission rate, or reduce the upper limit of the number of retransmissions.
[0092] In this embodiment, the sending end calculates the round-trip time according to the sending time of the encrypted video media packet and the return time of the confirmation response based on the network status analysis. The sending end calculates the timeout retransmission time based on the round-trip time, and obtains the packet loss rate by determining the number of successfully sent data and the number of unsuccessfully sent data. The sending end adjusts the sending parameters of the encrypted video media packet according to the timeout retransmission time and the packet loss rate, thereby being able to dynamically adjust the sending parameters of the encrypted video media packet, which helps to optimize transmission efficiency.
[0093] In this embodiment, the sending end 10 is also used to send the encrypted video media package to the receiving end through a communication channel.
[0094] It is understandable that the encrypted video media packets may be transmitted via a highly reliable and highly secure Real-time Transport Protocol (RTP) or URTP communication channel.
[0095] The sending end 10 is also used to resend the data packet based on a data retransmission mechanism if no confirmation response is received from the receiving party within a timeout retransmission time threshold, and accumulate the number of retransmissions.
[0096] It should be understood that after sending each encrypted video media packet, the sender will wait for the receiver's confirmation response. If no confirmation response is received from the receiver within the timeout retransmission time threshold, the encrypted video media packet will be resent and the number of retransmissions of the media packet will be accumulated.
[0097] The sending end 10 is further configured to abandon sending the encrypted video media packet if the confirmation response is not received when the number of retransmissions reaches an upper limit of the number of retransmissions.
[0098] It is understandable that if the sender still does not receive a confirmation response from the receiver after reaching the upper limit of the number of retransmissions, it will give up sending the encrypted video media package. In addition, after giving up sending, the sender may take other measures, such as recording an error log, notifying the user, or trying to send other media packages.
[0099] For ease of understanding, refer to Figure 3 Host A (sender) sends an encrypted video media packet to host B (receiver) through a communication channel. If no confirmation is received from host B within the timeout retransmission time threshold and the number of retransmissions does not reach the upper limit, the encrypted video media packet is resent. If no reply is received after the number of retransmissions reaches the upper limit, the data is abandoned and the next block of data is transmitted.
[0100] In this embodiment, the sending end sends the encrypted video media packet to the receiving end through the communication channel. Based on the data retransmission mechanism, if the sending end does not receive the confirmation response from the receiving end within the timeout retransmission time threshold, the sending end resends the data packet and accumulates the number of retransmissions. If the sending end still does not receive the confirmation response when the number of retransmissions reaches the upper limit of the number of retransmissions, the sending end abandons sending the encrypted video media packet, thereby effectively balancing the reliability and efficiency of data transmission and avoiding resource waste and transmission delays caused by excessive retransmissions.
[0101] In this embodiment, the transmitting end 10 is further used to unpack the video data based on the original standard codec to obtain the part to be encrypted.
[0102] It should be understood that based on the original standard codec, the sender first parses the format of the video data and identifies the various components of the video data (such as video frames, audio frames, metadata, etc.). According to the preset rules or configurations, the part that needs to be encrypted is separated from the video data stream. This part may include pixel data of video frames, audio data of audio frames, or some specific metadata.
[0103] The transmitting end 10 is further configured to encrypt the to-be-encrypted portion based on an encryption algorithm by using the key and the dictionary table to obtain encrypted video data.
[0104] It is understandable that the sender uses a preset key to initialize the encryption algorithm and uses a dictionary table to enhance the complexity and security of the encryption process. The encryption algorithm, key and dictionary table are used to encrypt the video data to be encrypted to generate encrypted video data.
[0105] The sending end 10 is also used to encapsulate the encrypted video data into an encrypted video media packet.
[0106] It should be understood that the transmitting end encapsulates the encrypted video data into a media packet conforming to the selected media packet encapsulation format, which may be a multimedia computer file format (MPEG-4 Part 14, MP4), a Matroska container format (Matroska, MKV) or an audio video interleave format (Audio Video Interleave, AVI), etc.
[0107] It should be noted that during the encapsulation process, the sender may need to add some necessary metadata, such as timestamp, sequence number, packet type, etc., and may also perform further encoding or compression processing on the media packet.
[0108] In this embodiment, the sending end constructs a dictionary table containing encryption mapping relationships according to the encryption requirements and encryption priority of the video data, and uses the dictionary table as an encryption and decryption retrieval library. The sending end replaces the characters or strings in the video data with the corresponding encrypted characters or encrypted strings in the encryption and decryption retrieval library, thereby ensuring that each character or string can be uniquely and accurately mapped to the corresponding encrypted character or encrypted string. By adopting this encryption method, sensitive information in the video data is effectively protected.
[0109] Reference Figure 4 The video transmission system of the present application provides a video transmission method. Figure 4 This is a flow chart of the first embodiment of the video transmission method of the present application, wherein the video transmission system includes: an information reading device, a terminal device, and a barcode generating device; the video transmission method includes:
[0110] Step S10: The sending end generates a key by combining a random password with an encryption salt.
[0111] It should be noted that the sending end can be a system including a video acquisition device, a video encoder, a communication terminal or a gateway, and this embodiment does not limit this; a random password is a randomly generated password used to increase the complexity and security of the key; an encryption salt is a random data used to generate a key in combination with a password, and its length and complexity can be adjusted according to actual needs; a key is a secret code used to encrypt and decrypt data.
[0112] It should be understood that a sufficiently long and complex random password is generated using a secure random number generator, which may be a functional module in a programming language. The generated random password and the encryption salt are concatenated or combined according to a certain rule.
[0113] Step S20: The sending end encrypts the video data based on the encryption algorithm by using the key and the dictionary table to obtain an encrypted video media package.
[0114] It should be noted that the dictionary table defines the correspondence between the original characters or character strings and the encrypted characters or encrypted character strings.
[0115] It is understandable that, according to the sensitivity and encryption requirements of the video data, a suitable encryption algorithm is selected, such as the Advanced Encryption Standard (AES), the RSA encryption algorithm, etc. Then, after the video data is preprocessed (format conversion, compression, etc.), the video data is encrypted using the selected encryption algorithm. During the encryption process, the key is used to generate the ciphertext, and the dictionary table is used to replace or obfuscate certain parts of the video data. Further, the encrypted video data is encapsulated into an encrypted video media package, which may contain the encrypted video data, information about the encryption algorithm, key management information, etc.
[0116] Step S30: The sending end sends the encrypted video media package to the receiving end through a communication channel based on a data retransmission mechanism and network status analysis.
[0117] It should be noted that the data retransmission mechanism is a method to ensure data integrity and reliability. When data is lost or erroneous, it will be resent. Network status analysis is to monitor and analyze network performance to optimize data transmission. For example, by analyzing indicators such as network delay and packet loss rate, the data transmission rate can be adjusted or a more stable communication channel can be selected.
[0118] It should be understood that before sending the encrypted video media package, it is necessary to evaluate the current network status, including bandwidth, delay, packet loss rate and other indicators, which can be achieved through network monitoring tools or special network analysis software. According to the results of the network status analysis, the most appropriate communication channel is selected for data transmission, which may include different communication methods such as wired network, wireless network, satellite communication, etc.
[0119] In addition, in order to enable the encrypted video media packets to be correctly reassembled and verified in sequence at the receiving end, a unique sequence number needs to be assigned to each encrypted video media packet.
[0120] It is understandable that the encrypted video media packets are sent to the receiving end in sequence through the selected communication channel. Based on the data retransmission mechanism, after successfully receiving each media packet, the receiving end sends an acknowledgement character (ACK) to the sending end, indicating that the media packet has been successfully received.
[0121] Step S40: The receiving end decrypts the encrypted video media packet.
[0122] It should be noted that the receiving end may be a console of a video surveillance center, a mobile command terminal or other communication terminal, and this embodiment does not impose any limitation on this.
[0123] It should be understood that after receiving the encrypted video media package, the receiving end obtains the same key used by the sending end for encryption through a secure channel (such as a pre-agreed key exchange protocol) or a secure storage mechanism, and determines the same decryption algorithm used by the sending end for encryption. Using the selected decryption algorithm and key, each data block in the encrypted video media package is decrypted block by block. After the decryption process is completed, the receiving end will restore the original, unencrypted video data.
[0124] In addition, it should be noted that before decryption, the receiving end may first perform an integrity check on the encrypted video media packets through a checksum or hash value, and if the encrypted video media packets are sent in sequence, the receiving end needs to reassemble them into a complete video stream according to the sequence number.
[0125] In this embodiment, the sending end generates a key by combining a random password with an encryption salt. The sending end encrypts the video data based on an encryption algorithm by using a key and a dictionary table to obtain an encrypted video media package. The sending end sends the encrypted video media package to the receiving end through a communication channel based on a data retransmission mechanism and network status analysis, and the receiving end decrypts the encrypted video media package. This improves the security of video transmission between the sending end and the receiving end, prevents unauthorized access and tampering, ensures the integrity and authenticity of the video data, minimizes data loss and delay, and improves the reliability and real-time performance of communications.
[0126] Reference Figure 5 , Figure 5 This is a flow chart of the second embodiment of the video transmission method of the present application, based on the above Figure 4 The illustrated embodiment provides a second embodiment of the video transmission method of the present application.
[0127] In this embodiment, step S30 includes:
[0128] Step S301: the sending end sends the encrypted video media package to the receiving end through the communication channel based on the timeout retransmission time threshold and the upper limit of the retransmission number of the data retransmission mechanism.
[0129] It is understandable that the data retransmission mechanism sets a timeout retransmission threshold, that is, if the encrypted video media packet sent does not receive confirmation from the receiver within the specified time, it is considered to have failed. At the same time, the data retransmission mechanism also sets an upper limit on the number of retransmissions to limit the number of retransmissions of the same encrypted video media packet to avoid infinite retransmissions that lead to resource waste.
[0130] Step S302: The sending end marks the encrypted video media packet that has been successfully sent according to the confirmation response of the receiving party based on the sliding window protocol.
[0131] It should be noted that the sliding window protocol is a reliable data transmission protocol that allows the sender to send multiple data packets before stopping and waiting for confirmation. At any time, the sender and the receiver maintain a continuous range of sequence numbers of frames (or data packets) allowed to be sent or received.
[0132] Step S303: the sending end simultaneously sends multiple encrypted video media packets to the receiving end by moving a sliding window corresponding to the encrypted video data.
[0133] It is understandable that after successfully receiving the encrypted video media packet, the receiving end will send a confirmation response to the sending end to indicate that the media packet has been successfully sent and received. The sending end dynamically adjusts the number and order of the encrypted video media packets sent by moving the sliding window corresponding to the encrypted video data according to the confirmation character mark of the receiving end. The size of the sliding window indicates how much buffer the receiving end has available for receiving data, and the sending end can determine how many bytes of data should be sent based on this size.
[0134] For ease of understanding, refer to Figure 2 The data from 32 to 51 are first sent, as shown in the dotted box. After receiving the confirmation response of the data from 32 to 35, the window is moved back, as shown in the solid box.
[0135] Step S304: the sending end adjusts the sending parameters of the encrypted video media packet based on the network status analysis.
[0136] It is understandable that the sender will analyze the current network status in real time or periodically, including key indicators such as bandwidth, delay, packet loss rate, etc., and adjust the sending parameters of the encrypted video media packet based on the results of the network status analysis, such as adjusting the size of the data packet, the sending rate, etc.
[0137] When the network condition is good, the sender may increase the size and sending rate of the data packet; when the network condition is poor, the size and sending rate of the data packet can be reduced. In addition, when receiving large blocks of data, according to the current bandwidth, in order to avoid network congestion and large amounts of packet loss and retransmission, the sending time interval between data packets can be appropriately increased.
[0138] In this embodiment, the sending end sends the encrypted video media packet to the receiving end through the communication channel through the timeout retransmission time threshold and the upper limit of the number of retransmissions based on the data retransmission mechanism. The sending end marks the encrypted video media packet that has been successfully sent according to the confirmation response of the receiving end based on the sliding window protocol. The sending end sends multiple encrypted video media packets to the receiving end at the same time by moving the sliding window corresponding to the encrypted video data. The sending end adjusts the sending parameters of the encrypted video media packet based on network status analysis, thereby improving the throughput and real-time performance of video data transmission, and helping to reduce network congestion and data packet loss.
[0139] In this embodiment, step S304 includes:
[0140] The transmitting end calculates the round trip time based on the network status analysis and the sending time of the encrypted video media packet and the return time of the confirmation response;
[0141] The sending end calculates the timeout retransmission time according to the round-trip time, and obtains the packet loss rate by determining the number of successfully sent data and the number of unsuccessfully sent data;
[0142] The sending end adjusts the sending parameters of the encrypted video media packet according to the timeout retransmission time and the packet loss rate.
[0143] It is understandable that when the sender sends the encrypted video media packet, it will record the sending time of each media packet. When the receiver successfully receives the media packet and returns a confirmation response, the sender will record the return time of the confirmation response. According to the recorded sending time and the return time of the confirmation response, the round-trip time (Render to Texture, RTT) of each encrypted video media packet is calculated. The round-trip time represents the total time required from the sender sending the media packet to the receiver returning the confirmation response.
[0144] It should be understood that the timeout retransmission time is calculated based on the calculated round-trip time and a preset coefficient (usually referred to as a "timeout factor" or a "retransmission factor").
[0145] It should be noted that the timeout retransmission period is usually set to a multiple of the round-trip time to ensure that in most cases, if a media packet is lost or delayed too much during transmission, the sender can resend the media packet within a reasonable time.
[0146] It is understandable that the packet loss rate is usually expressed as the ratio of the number of media packets that were not successfully sent to the total number of media packets sent. The sender will count the number of encrypted video media packets that were successfully sent and the number of media packets that were not successfully sent (i.e., need to be retransmitted) within a period of time, and calculate the packet loss rate based on the number of statistical data.
[0147] It is understandable that the transmission parameters of the encrypted video media packet are dynamically adjusted according to the calculated timeout retransmission time and packet loss rate. If the timeout retransmission time is long and the packet loss rate is high, the sender may reduce the size of the data packet, reduce the transmission rate, or increase the upper limit of the number of retransmissions. If the timeout retransmission time is short and the packet loss rate is low, the sender may increase the size of the data packet, increase the transmission rate, or reduce the upper limit of the number of retransmissions.
[0148] In this embodiment, the sending end calculates the round-trip time according to the sending time of the encrypted video media packet and the return time of the confirmation response based on the network status analysis. The sending end calculates the timeout retransmission time based on the round-trip time, and obtains the packet loss rate by determining the number of successfully sent data and the number of unsuccessfully sent data. The sending end adjusts the sending parameters of the encrypted video media packet according to the timeout retransmission time and the packet loss rate, thereby being able to dynamically adjust the sending parameters of the encrypted video media packet, which helps to optimize transmission efficiency.
[0149] In this embodiment, step S301 includes:
[0150] The sending end sends the encrypted video media package to the receiving end through the communication channel;
[0151] The sending end resends the data packet based on the data retransmission mechanism, and accumulates the number of retransmissions if the sending end does not receive a confirmation response from the receiving end within the timeout retransmission time threshold;
[0152] The sending end abandons the encrypted video media packet if the confirmation response is not received when the number of retransmissions reaches the upper limit of the number of retransmissions.
[0153] It is understandable that the encrypted video media packets may be transmitted via a highly reliable and highly secure Real-time Transport Protocol (RTP) or URTP communication channel.
[0154] It should be understood that after sending each encrypted video media packet, the sender will wait for the receiver's confirmation response. If no confirmation response is received from the receiver within the timeout retransmission time threshold, the encrypted video media packet will be resent and the number of retransmissions of the media packet will be accumulated.
[0155] It is understandable that if the sender still does not receive a confirmation response from the receiver after reaching the upper limit of the number of retransmissions, it will give up sending the encrypted video media package. In addition, after giving up sending, the sender may take other measures, such as recording an error log, notifying the user, or trying to send other media packages.
[0156] For ease of understanding, refer to Figure 3Host A (sender) sends an encrypted video media packet to host B (receiver) through a communication channel. If no confirmation is received from host B within the timeout retransmission time threshold and the number of retransmissions does not reach the upper limit, the encrypted video media packet is resent. If no reply is received after the number of retransmissions reaches the upper limit, the data is abandoned and the next block of data is transmitted.
[0157] In this embodiment, the sending end sends the encrypted video media packet to the receiving end through the communication channel. Based on the data retransmission mechanism, if the sending end does not receive the confirmation response from the receiving end within the timeout retransmission time threshold, the sending end resends the data packet and accumulates the number of retransmissions. If the sending end still does not receive the confirmation response when the number of retransmissions reaches the upper limit of the number of retransmissions, the sending end abandons sending the encrypted video media packet, thereby effectively balancing the reliability and efficiency of data transmission and avoiding resource waste and transmission delays caused by excessive retransmissions.
[0158] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0159] 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.
[0160] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0161] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A video transmission system, characterized in that: The video transmission system comprises: a transmitting end and a receiving end; The sending end is used to generate a key by combining a random password with an encryption salt; The transmitting end is further used to encrypt the video data based on the encryption algorithm by using the key and the dictionary table to obtain an encrypted video media packet; The transmitting end is further used to send the encrypted video media packet to the receiving end through a communication channel based on a data retransmission mechanism and network status analysis; The receiving end is used to decrypt the encrypted video media package.
2. The video transmission system according to claim 1, characterized in that: The transmitting end is further used to send the encrypted video media package to the receiving end through the communication channel based on the timeout retransmission time threshold and the upper limit of the retransmission number of the data retransmission mechanism; The transmitting end is further used to mark the encrypted video media packet that has been successfully sent according to the confirmation response of the receiving party based on the sliding window protocol; The transmitting end is further used to simultaneously send multiple encrypted video media packets to the receiving end by moving a sliding window corresponding to the encrypted video data; The sending end is also used to adjust the sending parameters of the encrypted video media packet based on network status analysis.
3. The video transmission system according to claim 2, characterized in that: The transmitting end is further used to calculate the round trip time based on the network status analysis according to the sending time of the encrypted video media packet and the return time of the confirmation response; The transmitting end is further used to calculate the timeout retransmission time according to the round-trip time, and obtain the packet loss rate by determining the number of successfully sent data and the number of unsuccessfully sent data; The sending end is further used to adjust the sending parameters of the encrypted video media packet according to the timeout retransmission time and the packet loss rate.
4. The video transmission system according to claim 2, characterized in that: The sending end is also used to send the encrypted video media package to the receiving end through the communication channel; The transmitting end is further configured to resend the data packet based on a data retransmission mechanism and accumulate the number of retransmissions if no confirmation response is received from the receiving end within a timeout retransmission time threshold; The sending end is further configured to abandon sending the encrypted video media packet if the confirmation response is not received when the number of retransmissions reaches an upper limit of the number of retransmissions.
5. The video transmission system according to any one of claims 1 to 4, characterized in that: The transmitting end is further used to construct a dictionary table containing encryption mapping relationships according to the encryption requirements and encryption priority of the video data, and use the dictionary table as an encryption and decryption retrieval library; The sending end is also used to replace the characters or character strings in the video data with corresponding encrypted characters or encrypted character strings in the encryption and decryption retrieval library.
6. The video transmission system according to any one of claims 1 to 4, characterized in that: The transmitting end is also used to unpack the video data based on the original standard codec to obtain the part to be encrypted; The transmitting end is further used to encrypt the to-be-encrypted part by using the key and the dictionary table based on an encryption algorithm to obtain encrypted video data; The sending end is also used to encapsulate the encrypted video data into an encrypted video media packet.
7. A video transmission method, characterized in that: The video transmission method is applied to a video transmission system, the system comprising: a transmitting end and a receiving end; the method comprises: The sending end generates a key by combining a random password with an encryption salt; The sending end encrypts the video data based on the encryption algorithm by using the key and the dictionary table to obtain an encrypted video media packet; The sending end sends the encrypted video media packet to the receiving end through a communication channel based on a data retransmission mechanism and network status analysis; The receiving end decrypts the encrypted video media packet.
8. The video transmission method according to claim 7, characterized in that: The step of sending the encrypted video media package to the receiving end through a communication channel based on a data retransmission mechanism and network status analysis specifically includes: The sending end sends the encrypted video media packet to the receiving end through the communication channel based on the timeout retransmission time threshold and the upper limit of the retransmission number of the data retransmission mechanism; The sending end marks the encrypted video media packet that has been successfully sent according to the confirmation response of the receiving party based on the sliding window protocol; The sending end simultaneously sends a plurality of encrypted video media packets to the receiving end by moving a sliding window corresponding to the encrypted video data; The sending end adjusts the sending parameters of the encrypted video media packet based on network status analysis.
9. The video transmission method according to claim 8, characterized in that: The step of adjusting the transmission parameters of the encrypted video media packet by the transmitting end based on the network status analysis specifically includes: The transmitting end calculates the round trip time based on the network status analysis and the sending time of the encrypted video media packet and the return time of the confirmation response; The sending end calculates the timeout retransmission time according to the round-trip time, and obtains the packet loss rate by determining the number of successfully sent data and the number of unsuccessfully sent data; The sending end adjusts the sending parameters of the encrypted video media packet according to the timeout retransmission time and the packet loss rate.
10. The video transmission method according to claim 8, characterized in that: The step of simultaneously sending a plurality of encrypted video media packets to a receiver by moving a sliding window corresponding to the encrypted video data at the transmitting end specifically comprises: The sending end sends the encrypted video media package to the receiving end through the communication channel; The sending end resends the data packet based on the data retransmission mechanism, and accumulates the number of retransmissions if the sending end does not receive a confirmation response from the receiving end within the timeout retransmission time threshold; The sending end abandons the encrypted video media packet if the confirmation response is not received when the number of retransmissions reaches the upper limit of the number of retransmissions.