Video surveillance transmission method and device based on dual-channel communication and selective encryption
By adopting dual-channel communication and selective encryption methods in the video surveillance system, combining the key management and intelligent load monitoring of the hardware security module, the problem of inefficient transmission security and energy consumption management is solved, and efficient and secure video surveillance transmission and equipment management are achieved.
Patent Information
- Application Number
- CN202510113259.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2045-01-24
AI Technical Summary
The existing video surveillance systems have problems such as insufficient transmission security and low energy consumption management efficiency. Traditional single channel transmission is likely to lead to network congestion, lack of targeted data protection mechanisms, and at the same time, fixed working modes lead to energy waste.
Using a video surveillance transmission method based on dual-channel communication and selective encryption, efficient data transmission is achieved by building two independent channels of video data transmission and control signaling. The device unique identification and key management mechanism based on the hardware security module is adopted to selectively encrypt the keyframes in the video stream, and only the DC coefficients representing the overall brightness and the AC coefficients of detailed information are encrypted and protected. At the same time, an intelligent load monitoring and sleep wake-up mechanism was introduced to dynamically adjust the working status of the equipment based on video viewing requests, image changes and human body sensing signals.
While ensuring data security, it significantly improves the system's energy efficiency, realizes intelligent management of monitoring equipment, reduces energy consumption, and improves the real-time and reliability of the system.
Smart Images

Figure CN119603431B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a video surveillance transmission method and device based on dual-channel communication and selective encryption. Background Art
[0002] Video surveillance systems are widely used in the security field, but existing technologies generally have problems with insufficient transmission security and inefficient energy management. Traditional video surveillance often uses a single channel to transmit all data, which easily causes network congestion and lacks targeted data protection mechanisms. At the same time, existing systems mostly use fixed working modes, and the continuous operation of the equipment leads to energy waste, especially in low-load scenarios.
[0003] In terms of data security, simple full encryption not only increases the system computing burden, but also affects the transmission efficiency. Choosing no encryption can easily lead to the leakage of monitoring data and bring security risks. Existing encryption schemes often ignore the structural characteristics of video data and fail to achieve key protection of key information.
[0004] In terms of energy consumption management, traditional systems lack intelligent load perception and dynamic adjustment mechanisms. Due to the lack of effective sleep and wake-up strategies, the equipment continues to work even when it does not need to be monitored, resulting in a large amount of unnecessary energy consumption. This fixed working mode not only affects the service life of the equipment, but also increases the operation and maintenance costs.
[0005] Therefore, how to improve system operation efficiency while ensuring data security and realize intelligent management of monitoring equipment is a technical problem that needs to be solved urgently in the current video surveillance field. This is of great significance for building a safer and more energy-efficient modern monitoring system. Summary of the invention
[0006] In response to the problems in the prior art, the present application provides a video surveillance transmission method and device based on dual-channel communication and selective encryption, which can significantly improve system energy efficiency while ensuring data security, and provide a reliable technical solution for the video surveillance field.
[0007] In order to solve at least one of the above problems, the present application provides the following technical solutions:
[0008] In a first aspect, the present application provides a video surveillance transmission method based on dual-channel communication and selective encryption, comprising:
[0009] Building a video surveillance transmission system, interconnecting the camera module, mobile communication module and main control module of the video surveillance transmission system to form a hardware architecture, configuring the network access point, network address and port parameters of the mobile communication module, establishing a video data transmission channel through the mobile communication module, configuring the message queue telemetry transmission protocol parameters of the main control module, and establishing a control signaling transmission channel through the main control module, wherein the control signaling transmission channel is used to transmit device commands and status information;
[0010] Generate a unique identification code for each camera module in the video surveillance transmission system, calculate a device key based on the unique identification code, write the device key into a hardware security module for storage, collect video stream data output by the camera module, parse the video stream data according to the video coding standard to obtain key frames, prediction frames and bidirectional prediction frames, divide the key frames into multiple macroblocks, extract the DC coefficient representing the overall brightness and the AC coefficient representing the detail information in the macroblock, generate a first pseudo-random sequence based on the device key, perform an XOR operation on the first pseudo-random sequence and the DC coefficient to obtain an encrypted DC coefficient, generate a second pseudo-random sequence based on the device key, perform an XOR operation on the second pseudo-random sequence and the AC coefficient to obtain an encrypted AC coefficient, reconstruct the macroblock using the encrypted DC coefficient and the encrypted AC coefficient, package the reconstructed macroblock to obtain an encrypted video stream, and upload the encrypted video stream to a remote server through the video data transmission channel;
[0011] The workload of the video surveillance transmission system is monitored in real time. When it is detected that there is no video viewing request within a preset time period, the camera module is controlled to switch to sleep mode, the change in image data collected by the camera module and the human infrared sensing signal are detected, and a wake-up instruction issued by a remote server is received. Based on the change in image data, the human infrared sensing signal and the wake-up instruction, it is determined whether a wake-up condition is met, and when the wake-up condition is met, the camera module is restored from sleep mode to working mode.
[0012] Further, generating a unique identification code for each camera module in the video surveillance transmission system, calculating a device key based on the unique identification code, and writing the device key into a hardware security module for storage, includes:
[0013] Obtaining a physical address and a device serial number of the camera module, concatenating the physical address and the device serial number to form a string to be encrypted, using a hash algorithm to calculate a hash value for the string to be encrypted, and generating the unique identification code based on the hash value;
[0014] The unique identification code is input as a seed key into a key generation function, a master key is calculated and generated by the key generation function, the master key is segmented to obtain multiple sub-keys, the sub-keys are written in sequence into a designated storage area of the hardware security module, and the read-write protection attributes of the storage area are configured.
[0015] Further, the video stream data output by the camera module is collected, the video stream data is parsed according to the video coding standard to obtain key frames, prediction frames and bidirectional prediction frames, the key frames are divided into multiple macroblocks, and the DC coefficient representing the overall brightness and the AC coefficient representing the detail information in the macroblock are extracted, including:
[0016] The original image data is collected by the image sensor of the camera module, the original image data is converted into a luminance component and a chrominance component by color space conversion, video stream data is generated according to the luminance component and the chrominance component, the video stream data is decoded according to the frame type identifier and the inter-frame reference relationship specified in the video coding standard, and the decoded data is classified into key frames, predicted frames and bidirectional predicted frames;
[0017] The key frame is divided into multiple macroblocks according to a preset pixel matrix size, and a two-dimensional discrete cosine transform is performed on each macroblock to obtain a frequency domain coefficient matrix. The DC coefficient at the upper left corner position is extracted from the frequency domain coefficient matrix as the coefficient representing the overall brightness, and the AC coefficients at the remaining positions are extracted as the coefficients representing the detail information.
[0018] Further, the generating a first pseudo-random sequence based on the device key, and performing an XOR operation on the first pseudo-random sequence and the DC coefficient to obtain an encrypted DC coefficient, comprises:
[0019] Reading the device key from the hardware security module, combining the device key with a system timestamp to obtain a seed value, inputting the seed value into a linear congruential random number generator, and calculating and generating a first pseudo-random sequence having a length matching the DC coefficient through the linear congruential random number generator;
[0020] The DC coefficient is converted into a binary bit stream, the first pseudo-random sequence is normalized to obtain a binary random bit stream, the binary random bit stream is bit-wise XOR-ed with the binary bit stream of the DC coefficient, and the XOR-ed result is converted back to the original numerical representation to obtain the encrypted DC coefficient.
[0021] Further, the generating a second pseudo-random sequence based on the device key, and performing an XOR operation on the second pseudo-random sequence and the AC coefficient to obtain the encrypted AC coefficient, comprises:
[0022] Reading the device key from the hardware security module, combining the device key with the current frame number to obtain an initial vector, constructing a state matrix based on the initial vector, generating a chaotic mapping sequence through iterative calculation of the state matrix, and quantizing the chaotic mapping sequence to obtain a second pseudo-random sequence whose length matches the AC coefficient;
[0023] The AC coefficients are rearranged into a one-dimensional sequence in a zigzag scanning order, the one-dimensional sequence is run-length encoded to obtain a compressed bit stream, the second pseudo-random sequence is converted into a binary sequence of the same length, an XOR operation is performed on the binary sequence and the compressed bit stream, and the XOR operation result is decoded and restored to obtain the encrypted AC coefficients.
[0024] Furthermore, the step of reconstructing the macroblocks by using the encrypted DC coefficients and the encrypted AC coefficients, packaging the reconstructed macroblocks to obtain an encrypted video stream, and uploading the encrypted video stream to a remote server through the video data transmission channel includes:
[0025] Fill the encrypted DC coefficient to the upper left corner of the frequency domain coefficient matrix, fill the encrypted AC coefficient to the remaining positions of the frequency domain coefficient matrix according to a specified scanning order, perform a two-dimensional inverse discrete cosine transform on the filled frequency domain coefficient matrix to obtain reconstructed macroblock data, and write the reconstructed macroblock data into the frame buffer according to the position information of the original macroblock;
[0026] The reconstructed macroblock data is read from the frame buffer, the macroblock data is entropy encoded to obtain a bitstream, the bitstream is encapsulated into a network adaptation layer unit, a frame type identifier and an encryption tag are added to the network adaptation layer unit, the marked network adaptation layer unit is organized into a real-time transport protocol data packet, and the real-time transport protocol data packet is sent to the remote server through the video data transmission channel.
[0027] Further, judging whether a wake-up condition is met based on the image data change amount, the human infrared sensing signal and the wake-up instruction, and restoring the camera module from the sleep mode to the working mode when the wake-up condition is met, includes:
[0028] Calculate the pixel difference between two adjacent frames of image data to obtain the image data change amount, obtain the level signal output by the human infrared sensor as the human infrared sensing signal, determine whether the image data change amount exceeds a preset threshold or whether the human infrared sensing signal is at a high level or whether a wake-up instruction issued by a remote server is received, and determine that the wake-up condition is met when any of the above conditions is met;
[0029] An enable signal is sent to the power supply circuit of the camera module, and the clock of the image sensor is turned on after the voltage of the camera module is stabilized, the register parameters of the image sensor are configured, automatic exposure and automatic white balance adjustment are performed, and the video encoder is turned on for data encoding processing after the image sensor outputs stable image data.
[0030] In a second aspect, the present application provides a video surveillance transmission device based on dual-channel communication and selective encryption, comprising:
[0031] A communication module is used to build a video surveillance transmission system, interconnect the camera module, mobile communication module and main control module of the video surveillance transmission system to form a hardware architecture, configure the network access point, network address and port parameters of the mobile communication module, establish a video data transmission channel through the mobile communication module, configure the message queue telemetry transmission protocol parameters of the main control module, establish a control signaling transmission channel through the main control module, and the control signaling transmission channel is used to transmit device commands and status information;
[0032] An encryption module is used to generate a unique identification code for each camera module in the video surveillance transmission system, calculate a device key based on the unique identification code, write the device key into a hardware security module for storage, collect video stream data output by the camera module, parse the video stream data according to the video coding standard to obtain key frames, prediction frames and bidirectional prediction frames, divide the key frames into multiple macroblocks, extract the DC coefficient representing the overall brightness and the AC coefficient representing the detail information in the macroblock, generate a first pseudo-random sequence based on the device key, perform an XOR operation on the first pseudo-random sequence and the DC coefficient to obtain an encrypted DC coefficient, generate a second pseudo-random sequence based on the device key, perform an XOR operation on the second pseudo-random sequence and the AC coefficient to obtain an encrypted AC coefficient, reconstruct the macroblock using the encrypted DC coefficient and the encrypted AC coefficient, package the reconstructed macroblock to obtain an encrypted video stream, and upload the encrypted video stream to a remote server through the video data transmission channel;
[0033] The monitoring module is used to monitor the workload of the video monitoring transmission system in real time, control the camera module to switch to sleep mode when it is detected that there is no video viewing request within a preset time period, detect the change in image data collected by the camera module and the human infrared sensing signal, receive the wake-up instruction issued by the remote server, judge whether the wake-up condition is met based on the change in image data, the human infrared sensing signal and the wake-up instruction, and restore the camera module from sleep mode to working mode when the wake-up condition is met.
[0034] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the video surveillance transmission method based on dual-channel communication and selective encryption are implemented.
[0035] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the video surveillance transmission method based on dual-channel communication and selective encryption.
[0036] In a fifth aspect, the present application provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the video surveillance transmission method based on dual-channel communication and selective encryption.
[0037] It can be seen from the above technical solution that the present application provides a video surveillance transmission method and device based on dual-channel communication and selective encryption, which realizes efficient data transmission by building two independent channels for video data transmission and control signaling. The unique device identification and key management mechanism based on the hardware security module is innovatively adopted to selectively encrypt the key frames in the video stream, and only encrypt and protect the DC coefficient representing the overall brightness and the AC coefficient of the detail information. At the same time, an intelligent load monitoring and sleep wake-up mechanism is introduced to dynamically adjust the working state of the equipment based on video viewing requests, image changes and human body sensing signals. This method significantly improves the system energy efficiency while ensuring data security, providing a reliable technical solution for the field of video surveillance. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0039] Figure 1 This is one of the flow charts of the video surveillance transmission method based on dual-channel communication and selective encryption in the embodiment of the present application;
[0040] Figure 2 This is a second flow chart of a video surveillance transmission method based on dual-channel communication and selective encryption in an embodiment of the present application;
[0041] Figure 3 The third flowchart of the video surveillance transmission method based on dual-channel communication and selective encryption in the embodiment of the present application;
[0042] Figure 4 This is a fourth flow chart of a video surveillance transmission method based on dual-channel communication and selective encryption in an embodiment of the present application;
[0043] Figure 5 This is a fifth flow chart of a video surveillance transmission method based on dual-channel communication and selective encryption in an embodiment of the present application;
[0044] Figure 6 This is a sixth flow chart of a video surveillance transmission method based on dual-channel communication and selective encryption in an embodiment of the present application;
[0045] Figure 7 FIG7 is a flow chart of a video surveillance transmission method based on dual-channel communication and selective encryption in an embodiment of the present application;
[0046] Figure 8 It is a structural diagram of a video surveillance transmission device based on dual-channel communication and selective encryption in an embodiment of the present application;
[0047] Fig. 9 It is a schematic diagram of the structure of an electronic device in an embodiment of the present application.
[0048] Reference numerals:
[0049] Electronic device 9600, central processing unit 9100, memory 9140, communication module 9110, input unit 9120, audio processor 9130, display 9160, power supply 9170, buffer memory 9141, application / function storage unit 9142, data storage unit 9143, driver program storage unit 9144, antenna 9111, speaker 9131, microphone 9132. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0051] The acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.
[0052] Taking into account the problems existing in the prior art, the present application provides a video surveillance transmission method and device based on dual-channel communication and selective encryption, which realizes efficient data transmission by building two independent channels for video data transmission and control signaling. The device unique identification and key management mechanism based on the hardware security module is innovatively adopted to selectively encrypt the key frames in the video stream, and only encrypt and protect the DC coefficient representing the overall brightness and the AC coefficient of the detail information. At the same time, an intelligent load monitoring and sleep wake-up mechanism is introduced to dynamically adjust the working state of the equipment based on video viewing requests, image changes and human body sensing signals. This method significantly improves the system energy efficiency while ensuring data security, providing a reliable technical solution for the field of video surveillance.
[0053] In order to significantly improve system energy efficiency while ensuring data security and provide a reliable technical solution for the video surveillance field, this application provides an embodiment of a video surveillance transmission method based on dual-channel communication and selective encryption, see Figure 1 The video surveillance transmission method based on dual-channel communication and selective encryption specifically includes the following contents:
[0054] Step S101: Building a video surveillance transmission system, connecting the camera module, mobile communication module and main control module of the video surveillance transmission system to each other to form a hardware architecture, configuring the network access point, network address and port parameters of the mobile communication module, establishing a video data transmission channel through the mobile communication module, configuring the message queue telemetry transmission protocol parameters of the main control module, and establishing a control signaling transmission channel through the main control module, wherein the control signaling transmission channel is used to transmit device commands and status information;
[0055] Optionally, this embodiment first constructs a set of video surveillance transmission system hardware architecture based on dual-channel communication. In terms of hardware connection, the camera module is connected to the main control module through the MIPI interface to ensure high-speed image data transmission; the mobile communication module uses the SPI bus to exchange data with the main control module to realize network communication function. This modular design enables the system to have good scalability and maintainability.
[0056] In the configuration process of the mobile communication module, this embodiment adopts a multi-level network parameter configuration mechanism. First, the network access point (APN) parameters are configured through AT commands to support automatic matching of the operator network. Then, the network address is obtained by DHCP, or a static IP address is configured according to the actual networking requirements. In the port configuration link, port mapping technology is used to map the internal service port to the external network to achieve NAT penetration and ensure reliable transmission of video data.
[0057] This embodiment implements adaptive bandwidth adjustment when establishing a video data transmission channel. By monitoring the network status in real time, the encoding parameters and transmission strategy of the video stream are dynamically adjusted. When the network bandwidth is sufficient, the video quality is maintained at a high level; when the network conditions are poor, the bit rate is automatically reduced to ensure smooth transmission. This mechanism effectively solves the problem of video freeze caused by unstable mobile networks.
[0058] In terms of the configuration of the message queue telemetry transport protocol (MQTT) of the main control module, this embodiment designs a hierarchical topic structure. Different types of messages such as device status information and control instructions are assigned to different topics, and the corresponding quality of service (QoS) level is set. For important control instructions, QoS2 level is used to ensure that the message must be delivered, while QoS0 level is used for ordinary status reports to reduce transmission overhead.
[0059] The establishment of the control signaling transmission channel adopts a session management mechanism. The device is kept online through heartbeat packets, and automatically reconnects when a network anomaly is detected. At the same time, message priority management is implemented, and emergency control commands can be queued for transmission to ensure timeliness of control. This embodiment also embeds timestamps and sequence numbers in the control signaling to effectively prevent command replay attacks.
[0060] To improve the reliability of the system, this embodiment implements a dual-channel mutual backup mechanism. When a video data transmission channel fails, low-bitrate key frames can be transmitted through the control signaling channel to ensure that the basic functions of video surveillance are not interrupted. Similarly, when the control signaling channel is abnormal, the device control capability can also be maintained by embedding control signaling in the video data channel.
[0061] In practical applications, the dual-channel separation transmission strategy of this embodiment significantly improves the real-time performance and reliability of the system. The control command will not be blocked by a large amount of video data, ensuring the response speed of remote control. At the same time, by adopting different transmission strategies for video data and control signaling, both the smoothness of video monitoring and the reliability of device control are guaranteed.
[0062] This embodiment achieves efficient transmission and reliable control of the video surveillance system through reasonable hardware architecture design and network transmission mechanism optimization. The system has strong environmental adaptability and can run stably in complex network environments, providing reliable technical support for remote video surveillance applications.
[0063] Step S102: Generate a unique identification code for each camera module in the video surveillance transmission system, calculate a device key based on the unique identification code, write the device key into a hardware security module for storage, collect video stream data output by the camera module, parse the video stream data according to the video coding standard to obtain key frames, prediction frames and bidirectional prediction frames, divide the key frames into multiple macroblocks, extract the DC coefficient representing the overall brightness and the AC coefficient representing the detail information in the macroblock, generate a first pseudo-random sequence based on the device key, perform an XOR operation on the first pseudo-random sequence and the DC coefficient to obtain an encrypted DC coefficient, generate a second pseudo-random sequence based on the device key, perform an XOR operation on the second pseudo-random sequence and the AC coefficient to obtain an encrypted AC coefficient, reconstruct the macroblock using the encrypted DC coefficient and the encrypted AC coefficient, package the reconstructed macroblock to obtain an encrypted video stream, and upload the encrypted video stream to a remote server through the video data transmission channel;
[0064] Optionally, this embodiment realizes the secure transmission of video surveillance data through a complete set of device authentication and video encryption transmission mechanisms. First, a unique identification code is generated for each camera module. The identification code is calculated by combining the physical address (MAC address) of the device with the serial number and then using the SHA-256 hash algorithm to ensure the uniqueness and unforgeability of the identification code.
[0065] In the process of generating device keys, this embodiment adopts a hierarchical key management strategy. Using the unique identification code as the seed, the master key is derived through the key generation function, and then the master key is decomposed into multiple sub-keys. These keys are written into different storage areas of the hardware security module and set with strict read-write protection attributes to effectively prevent the keys from being illegally read or tampered with.
[0066] For the processing of video data, this embodiment first collects the original video stream through the camera module and parses it according to the H.264 encoding standard. During the parsing process, the video frames are divided into key frames (I frames), predicted frames (P frames) and bidirectional predicted frames (B frames). Considering the encryption efficiency and real-time requirements, this embodiment only selectively encrypts the key frames. This strategy significantly reduces the computing overhead while ensuring security.
[0067] In the macroblock processing stage, this embodiment divides the key frame into 16×16 pixel macroblocks and performs a two-dimensional discrete cosine transform on each macroblock. In the transformed frequency domain coefficients, the DC coefficient in the upper left corner reflects the overall brightness information, and the AC coefficients in the remaining positions contain detail features. This separation processing mechanism lays the foundation for subsequent selective encryption.
[0068] This embodiment innovatively adopts a dual pseudo-random sequence encryption scheme. For the DC coefficient, a first pseudo-random sequence is generated based on the device key and the system timestamp, and the unpredictability of the sequence is ensured by a linear congruential algorithm. For the AC coefficient, a chaotic mapping sequence is constructed in combination with the device key and the current frame number to generate a second pseudo-random sequence. This dual encryption mechanism effectively prevents statistical analysis attacks.
[0069] In the encryption process, this embodiment adopts different processing strategies for the DC coefficient and the AC coefficient. The DC coefficient is directly XORed with the first pseudo-random sequence, while the AC coefficient is first subjected to zigzag scanning rearrangement and run-length coding compression, and then XORed with the second pseudo-random sequence. This differentiated processing method not only ensures the encryption strength, but also maintains a high compression rate.
[0070] In the macroblock reconstruction stage, this embodiment refills the encrypted DC coefficients and AC coefficients into the frequency domain coefficient matrix according to the original positions, and restores them to pixel domain data through two-dimensional discrete cosine inverse transform. The reconstructed macroblocks are organized into network adaptation layer units, and frame type identifiers and encryption tags are added, and finally encapsulated into real-time transport protocol data packets and sent to the remote server.
[0071] Through the above design, this embodiment realizes the safe and efficient transmission of video surveillance data. The selective encryption strategy significantly reduces system latency while maintaining high security. In practical applications, even if the network is monitored, attackers cannot restore valid video content, effectively protecting the security of surveillance data.
[0072] Step S103: Monitor the workload of the video surveillance transmission system in real time, control the camera module to switch to sleep mode when it is detected that there is no video viewing request within a preset time period, detect the change in image data collected by the camera module and the human infrared sensing signal, receive a wake-up instruction issued by a remote server, and determine whether a wake-up condition is met based on the change in image data, the human infrared sensing signal and the wake-up instruction; and restore the camera module from sleep mode to working mode when the wake-up condition is met.
[0073] Optionally, this embodiment designs an intelligent sleep and wake-up mechanism to address the power consumption problem of the video surveillance system. In terms of workload monitoring, a multi-dimensional load evaluation method is adopted, including comprehensive analysis of indicators such as CPU usage, memory usage, and network traffic. When the system detects that there is no user access request for a continuous period of time, the sleep mode is triggered, thereby reducing the overall energy consumption of the system.
[0074] This embodiment adopts a hierarchical sleep strategy when entering the sleep mode. First, the sampling frame rate and resolution of the camera module are reduced, and non-essential functions such as image enhancement processing are turned off. The processor enters a low-power mode, retaining only the most basic monitoring functions. This progressive sleep mechanism ensures the system's rapid response capability and minimizes energy consumption.
[0075] In terms of monitoring the amount of image data changes, this embodiment designs an efficient scene change detection algorithm. By comparing the difference map between consecutive frames with the preset threshold, it is determined whether the monitored scene has changed significantly. In order to improve the accuracy of detection, the algorithm adopts a regional division strategy and sets different detection sensitivities for different areas, effectively reducing misjudgments caused by factors such as changes in ambient light.
[0076] The human infrared sensing module is used as an auxiliary wake-up mechanism. This embodiment adopts dual judgment logic. First, the pyroelectric sensor detects the changes in far-infrared radiation radiated by the human body. When possible human activity is detected, the signal persistence and intensity change pattern are further analyzed to filter out interference sources such as animal activity. This multiple judgment mechanism significantly improves the accuracy of human detection.
[0077] The remote wake-up function is implemented using a lightweight communication protocol. The server can send a wake-up command to the device through the control signaling channel. The command contains a timestamp and authentication information to ensure the security of the wake-up operation. This embodiment also supports two modes: timed wake-up and conditional wake-up, which can be flexibly configured according to actual application requirements.
[0078] In the comprehensive judgment of the wake-up conditions, this embodiment adopts a decision-making mechanism of dynamic weight adjustment. According to the reliability of each trigger source in different scenarios, the weight ratio of image change detection, human body sensing and remote command is dynamically adjusted. For example, in a dark environment, the weight of the human body sensing signal is increased; in an outdoor scene, the sensitivity of image change detection is appropriately reduced.
[0079] This embodiment adopts a step-by-step startup strategy when the device is restored from sleep mode to working mode. First, the image acquisition and basic processing functions are restored, and then the video encoding and network transmission modules are gradually turned on after the image signal is stable. This gradual wake-up process avoids excessive instantaneous power consumption and ensures the stability of the system.
[0080] Through the above design, this embodiment significantly reduces system energy consumption while ensuring monitoring effects. The intelligent sleep and wake-up mechanism enables the device to adaptively adjust the working state according to actual needs, which not only meets the requirements of real-time monitoring, but also avoids unnecessary waste of resources. In practical applications, this mechanism is particularly suitable for places with large fluctuations in traffic flow, such as community entrances and exits, office areas and other scenarios.
[0081] From the above description, it can be seen that the video surveillance transmission method based on dual-channel communication and selective encryption provided by the embodiment of the present application can achieve efficient data transmission by building two independent channels for video data transmission and control signaling. The device unique identification and key management mechanism based on the hardware security module is innovatively adopted to selectively encrypt the key frames in the video stream, and only encrypt and protect the DC coefficient representing the overall brightness and the AC coefficient of the detail information. At the same time, an intelligent load monitoring and sleep wake-up mechanism is introduced to dynamically adjust the working state of the equipment based on video viewing requests, image changes and human body sensing signals. This method significantly improves the system energy efficiency while ensuring data security, providing a reliable technical solution for the field of video surveillance.
[0082] In one embodiment of the video surveillance transmission method based on dual-channel communication and selective encryption of the present application, see Figure 2 , and can also include the following:
[0083] Step S201: obtaining the physical address and device serial number of the camera module, concatenating the physical address and the device serial number to form a string to be encrypted, using a hash algorithm to calculate a hash value for the string to be encrypted, and generating the unique identification code based on the hash value;
[0084] Step S202: input the unique identification code as a seed key into a key generation function, calculate and generate a master key through the key generation function, segment the master key to obtain multiple sub-keys, write the sub-keys in sequence into the designated storage area of the hardware security module, and configure the read-write protection attributes of the storage area.
[0085] Optionally, this embodiment designs a secure and reliable device identity authentication and key management mechanism. First, the physical address and device serial number of the camera module are obtained as the unique identity of the device. The physical address uses the MAC address to ensure global uniqueness; the device serial number contains information such as production batch and model, providing additional device traceability capabilities.
[0086] During the splicing process, this embodiment adopts a special string formatting scheme. The 48-bit MAC address is converted into a hexadecimal string, a random separator is inserted between the MAC address and the device serial number, and timestamp information is added to form a string to be encrypted. This structured splicing method not only ensures the integrity of the data, but also increases the randomness of key generation.
[0087] This embodiment uses SHA-256 as the hash algorithm, which has good collision resistance and unidirectionality. To improve security, the encrypted string is first salted before the hash value is calculated, and the salt value is obtained by the random number generator when the device is started. This dual protection mechanism effectively prevents rainbow table attacks and ensures the security of the unique identification code.
[0088] When generating a unique identification code, this embodiment performs special processing on the hash value. A transformation matrix is constructed through displacement and XOR operation to map the hash value to an identification code space of a specified length. This processing method not only retains the uniqueness of the original hash value, but also adapts to the limitation on the length of the identification code in practical applications.
[0089] The key generation phase uses an HMAC-based key derivation function (HKDF). This function uses a unique identification code as a seed key and combines device-specific context information to generate a master key material of sufficient length through multiple rounds of iterations. This method ensures the high entropy value characteristics of the derived key while maintaining the independence of the keys.
[0090] In the segmented processing of the master key, this embodiment designs a hierarchical key architecture. The master key is decomposed into multiple subkeys such as video encryption key, authentication key, session key, etc. according to different security requirements and usage scenarios. Each subkey is assigned a clear scope of use and life cycle, which effectively reduces the impact of key leakage.
[0091] The storage area of the hardware security module is divided into multiple independent security zones, each of which is configured with strict access control policies. This embodiment uses a hardware-level read-write protection mechanism to ensure that subkeys can only be accessed by authorized programs. At the same time, key version management is implemented, supporting secure key updates and revocations, providing reliable protection for the full life cycle management of keys.
[0092] In order to deal with physical attacks, this embodiment integrates an anti-tampering mechanism in the hardware security module. When an abnormal access pattern or physical intrusion is detected, the stored key material is automatically cleared. In addition, a key backup and recovery mechanism is implemented to ensure the maintainability of the system in the event of hardware failure.
[0093] Through the above design, this embodiment establishes a complete device identity authentication and key management system. This solution ensures that each device has a unique and unforgeable identity, providing reliable key support for subsequent secure communication and data encryption. In practical applications, this mechanism effectively prevents device impersonation and man-in-the-middle attacks, and ensures the overall security of the video surveillance system.
[0094] In one embodiment of the video surveillance transmission method based on dual-channel communication and selective encryption of the present application, see Figure 3 , and can also include the following:
[0095] Step S301: collecting raw image data through the image sensor of the camera module, performing color space conversion on the raw image data to obtain a brightness component and a chrominance component, generating video stream data according to the brightness component and the chrominance component, decoding the video stream data according to the frame type identifier and inter-frame reference relationship specified in the video coding standard, and classifying the decoded data into key frames, predicted frames, and bidirectional predicted frames;
[0096] Step S302: Divide the key frame into multiple macroblocks according to a preset pixel matrix size, perform a two-dimensional discrete cosine transform on each macroblock to obtain a frequency domain coefficient matrix, extract the DC coefficient at the upper left corner position from the frequency domain coefficient matrix as the coefficient representing the overall brightness, and extract the AC coefficients at the remaining positions as the coefficients representing the detail information.
[0097] Optionally, this embodiment designs a set of efficient video data acquisition and preprocessing mechanisms. First, the image sensor converts the light signal into an electrical signal through the CMOS photosensitive element, and collects the original image data in a line-by-line scanning manner. In order to improve the image quality, the exposure parameters and gain values are adjusted in real time during the acquisition process to adapt to different lighting environments.
[0098] In the color space conversion link, this embodiment adopts the RGB to YUV conversion model. The Y component represents brightness information, and the U and V components represent chrominance information. This separation processing method not only conforms to the physiological characteristics of the human eye that is more sensitive to brightness, but also facilitates subsequent compression coding. The lookup table is used to accelerate the calculation during the conversion process, which significantly improves the processing efficiency.
[0099] The generation of video stream data adopts a pipeline processing architecture. First, the image is pre-processed by noise reduction and sharpening, and then the continuous images are organized into a video sequence according to the preset frame rate parameters. This embodiment implements adaptive bit rate control in this process, dynamically adjusts the compression parameters according to the complexity of the scene, and optimizes bandwidth utilization while ensuring image quality.
[0100] In terms of video coding, this embodiment adopts the H.264 coding standard. By analyzing the temporal correlation of the image content, video frames are divided into three types: I frames (key frames), P frames (forward prediction frames) and B frames (bidirectional prediction frames). I frames use intra-frame coding and do not rely on other frames; P frames use forward reference frames for predictive coding through motion estimation and compensation; B frames use both forward and backward reference frames for prediction to achieve a higher compression rate.
[0101] The macroblock division process adopts an adaptive block strategy. The basic unit is a 16×16 pixel macroblock, but for complex texture areas, it can be further divided into 8×8 or 4×4 sub-blocks. This flexible division method ensures coding efficiency and improves detail fidelity.
[0102] In the two-dimensional discrete cosine transform (2D-DCT) link, this embodiment adopts a fast algorithm. The two-dimensional transform is converted into two one-dimensional transforms through row-column decomposition, which significantly reduces the computational complexity. In the transformed frequency domain coefficient matrix, the DC coefficient (DC) in the upper left corner reflects the average brightness of the entire macroblock, and its numerical change has a significant impact on the visual effect; the AC coefficient (AC) in the remaining positions contains detailed feature information such as edges and textures.
[0103] This embodiment adopts an importance classification strategy in the coefficient extraction process. The DC coefficient is quantized with high precision to ensure the accurate transmission of brightness information; the AC coefficient uses different quantization parameters according to its position in the frequency domain matrix. The closer the position is to the upper left corner, the higher the quantization accuracy. This differentiated processing method not only ensures the fidelity of important visual information, but also achieves effective data compression.
[0104] Through the above design, this embodiment achieves high-quality acquisition and efficient compression of video data. Adaptive parameter adjustment ensures that clear images can be obtained in different monitoring scenarios, and the multi-level data processing strategy significantly reduces the amount of data while ensuring image quality. This processing mechanism is particularly suitable for video monitoring application scenarios that require long-term storage and real-time transmission, and lays a good foundation for subsequent encryption processing.
[0105] In one embodiment of the video surveillance transmission method based on dual-channel communication and selective encryption of the present application, see Figure 4 , and can also include the following:
[0106] Step S401: read the device key from the hardware security module, combine the device key with the system timestamp to obtain a seed value, input the seed value into a linear congruential random number generator, and calculate and generate a first pseudo-random sequence whose length matches the DC coefficient through the linear congruential random number generator;
[0107] Step S402: Convert the DC coefficient into a binary bit stream, normalize the first pseudo-random sequence to obtain a binary random bit stream, perform bit-by-bit XOR operation on the binary random bit stream and the binary bit stream of the DC coefficient, and convert the XOR operation result back to the original numerical representation to obtain the encrypted DC coefficient.
[0108] Optionally, this embodiment designs a video data encryption scheme based on a pseudo-random sequence. First, the device key is securely read from the hardware security module. The key is stored in a decentralized manner and requires a specific access protocol and permission verification to obtain the complete key. An integrity check is performed during the reading process to ensure that the key has not been tampered with.
[0109] The combination of the device key and the system timestamp uses a special concatenation algorithm. This embodiment divides the 64-bit timestamp into two parts, high and low, and performs XOR operations with different parts of the device key respectively, and then generates a seed value with sufficient entropy value through nonlinear transformation function processing. This dynamic seed generation mechanism ensures that even if the same device key is used, the encryption sequence generated each time is different.
[0110] The parameter selection of the linear congruential random number generator is optimized. This embodiment uses a large prime number as the modulus, and selects appropriate multipliers and increment parameters through primitive root testing to ensure that the generated sequence has a sufficiently long period and good statistical properties. In order to improve randomness, a periodic parameter update mechanism is also introduced to avoid predictable patterns.
[0111] When generating the first pseudo-random sequence, this embodiment realizes adaptive sequence length control. The sequence length is dynamically adjusted according to the number of bits of the DC coefficient to ensure a one-to-one encryption mapping relationship. At the same time, through the block processing method, it is avoided to generate a random sequence that is too long at one time, thereby improving the operation efficiency.
[0112] The binary conversion of the DC coefficient adopts a fixed-point representation method. Considering that the DC coefficient usually has a large numerical range, this embodiment adopts a dynamic bit width design, and selects a suitable number of bits according to the actual size of the coefficient, which not only ensures accuracy but also avoids unnecessary storage overhead.
[0113] The normalization of pseudo-random sequences uses a dynamic threshold method. By statistically analyzing the sequence, an adaptive binarization threshold is established to map continuous random values into a uniformly distributed binary bit stream. This processing method ensures the uniformity of encryption strength.
[0114] The implementation of XOR operation adopts byte-aligned parallel processing. This embodiment aligns the binary bit stream into 8-bit bytes and uses the processor's bit operation instruction set to perform batch XOR operations, which significantly improves the operation efficiency. At the same time, data protection is achieved during the operation to avoid leakage of intermediate results.
[0115] When converting the XOR result back to the original numerical representation, this embodiment designs a precision protection mechanism. Through a reasonable rounding strategy and overflow processing, it is ensured that the encrypted DC coefficient remains within the valid value range, avoiding quality loss caused by numerical representation.
[0116] Through the above design, this embodiment realizes efficient encryption of key information of video data. This selective encryption scheme based on DC coefficients significantly reduces the computational burden of encryption processing while ensuring the security of video data. It is particularly suitable for video surveillance scenarios that require real-time encrypted transmission, which not only ensures the confidentiality of the monitoring screen, but also maintains the real-time performance of the system. Another significant advantage of this solution is that it supports fast preview of video content, because only the DC coefficient is encrypted, and the basic image contour information is still retained, which is convenient for authorized users to identify content.
[0117] In one embodiment of the video surveillance transmission method based on dual-channel communication and selective encryption of the present application, see Figure 5 , and can also include the following:
[0118] Step S501: reading the device key from the hardware security module, combining the device key with the current frame number to obtain an initial vector, constructing a state matrix based on the initial vector, generating a chaotic mapping sequence through iterative calculation of the state matrix, and quantizing the chaotic mapping sequence to obtain a second pseudo-random sequence whose length matches the AC coefficient;
[0119] Step S502: Rearrange the AC coefficients into a one-dimensional sequence in a zigzag scanning order, perform run-length encoding on the one-dimensional sequence to obtain a compressed bit stream, convert the second pseudo-random sequence into a binary sequence of the same length, perform an XOR operation on the binary sequence and the compressed bit stream, and decode the XOR operation result to restore the encrypted AC coefficients.
[0120] Optionally, this embodiment designs a set of AC coefficient encryption schemes based on chaotic mapping. First, a time-sharing reading strategy is adopted when reading the device key from the hardware security module, dividing the key into multiple data blocks, and reading them sequentially through time multiplexing, thereby reducing the risk of key leakage.
[0121] The combination operation of the device key and the current frame number adopts a nonlinear transformation method. In this embodiment, the frame number is shifted and expanded, and multiple rounds of mixed operations are performed with different bytes of the device key to generate an initial vector with good randomness. This dynamic initial vector based on the frame number ensures that the same scene has different encryption effects at different times.
[0122] The state matrix is constructed using a block filling strategy. This embodiment fills the initial vector into the matrix according to a specific pattern and introduces a position-related disturbance factor, which increases the complexity of the state transition. The matrix size is dynamically adjusted according to the number of AC coefficients, which not only ensures the encryption strength but also avoids redundant calculations.
[0123] The generation of chaotic mapping sequence adopts an improved Logistic mapping model. This embodiment enhances the chaotic characteristics of the sequence through parameter optimization and multiple iterations. At the same time, an adaptive state monitoring mechanism is implemented. When it is detected that the sequence may fall into periodic changes, the control parameters are automatically adjusted to ensure the unpredictability of the sequence.
[0124] The quantization process adopts a dynamic layering strategy. Different quantization accuracies are set according to the position of the AC coefficient in the frequency domain matrix. High-frequency components close to the DC coefficient are quantized with higher precision, while low-frequency components far away are quantized with lower precision. This differentiated processing not only ensures the encryption strength of important information, but also improves processing efficiency.
[0125] The zigzag scanning rearrangement of the AC coefficients adopts an optimized access mode. This embodiment designs a cache-friendly scanning algorithm, which improves data access efficiency through pre-fetching and pipeline processing. At the same time, adaptive scanning path selection is implemented, and the scanning order is dynamically adjusted according to the coefficient distribution characteristics.
[0126] The run-length coding process introduces a context adaptation mechanism. This embodiment dynamically selects the optimal coding scheme by analyzing the distribution characteristics of adjacent coefficients. Long-range coding is used for continuous zero coefficient regions, and efficient entropy coding is used for non-zero coefficient regions, achieving a balance between compression efficiency and computational complexity.
[0127] The binary conversion of the second pseudo-random sequence adopts a multi-level quantization scheme. This embodiment designs a non-uniform quantization interval based on the statistical characteristics of the chaotic sequence to ensure that the converted binary sequence has good randomness. At the same time, the precise control of the sequence length is achieved, which is strictly matched with the compressed bit stream.
[0128] The implementation of XOR operation adopts stream processing architecture. This embodiment processes the bit stream in blocks, and the size of each block is optimized according to the processor cache characteristics, realizing efficient parallel operation. At the same time, a verification mechanism for the operation process is established to ensure the encryption quality.
[0129] Through the above design, this embodiment realizes the secure encryption of video data detail information. This encryption scheme based on chaotic system is highly unpredictable and effectively prevents statistical analysis attacks. In video surveillance applications, this scheme is particularly suitable for protecting detailed features in the picture, such as sensitive information such as faces and license plates, while maintaining the real-time processing capability of the system. The encrypted video retains the basic scene structure and ensures the security of privacy information, meeting the dual requirements of security and availability of the video surveillance system.
[0130] In one embodiment of the video surveillance transmission method based on dual-channel communication and selective encryption of the present application, see Figure 6 , and can also include the following:
[0131] Step S601: Fill the encrypted DC coefficient to the upper left corner of the frequency domain coefficient matrix, fill the encrypted AC coefficient to the remaining positions of the frequency domain coefficient matrix according to a specified scanning order, perform a two-dimensional inverse discrete cosine transform on the filled frequency domain coefficient matrix to obtain reconstructed macroblock data, and write the reconstructed macroblock data into the frame buffer according to the position information of the original macroblock;
[0132] Step S602: read the reconstructed macroblock data from the frame buffer, perform entropy coding on the macroblock data to obtain a bitstream, encapsulate the bitstream into a network adaptation layer unit, add a frame type identifier and an encryption tag in the network adaptation layer unit, organize the marked network adaptation layer unit into a real-time transport protocol data packet, and send the real-time transport protocol data packet to the remote server through the video data transmission channel.
[0133] Optionally, this embodiment designs a complete set of video data reconstruction and transmission schemes. First, in the reconstruction process of the frequency domain coefficient matrix, a precisely positioned filling strategy is adopted. The encrypted DC coefficients are preferentially filled into the key position in the upper left corner of the matrix, which determines the basic brightness level of the entire macroblock. A numerical range check is implemented during the filling process to ensure that the filled coefficients remain within the valid range.
[0134] The encrypted AC coefficients are filled in an adaptive scanning mode. This embodiment dynamically selects the optimal filling order according to the characteristics of the video content, and uses a detailed zigzag filling for areas with rich textures, while a simplified determinant filling is used for flat areas, thereby improving processing efficiency. During the filling process, the position index table is maintained to ensure that the coefficients are accurately returned.
[0135] The two-dimensional inverse discrete cosine transform is implemented using an optimized fast algorithm. This embodiment significantly reduces the computational complexity through butterfly operations and pre-calculated lookup tables. At the same time, fixed-point number operation optimization is introduced to reduce the precision loss and performance overhead caused by floating-point operations.
[0136] The reconstructed macroblock data writing process adopts a double buffer mechanism. This embodiment designs a ping-pong buffer, and while data is being written in one buffer, data can be read in another buffer, thus achieving parallel processing of write and read operations and improving data throughput.
[0137] The entropy coding stage adopts a context-adaptive coding strategy. This embodiment dynamically selects the optimal coding mode by analyzing the statistical characteristics of adjacent macroblocks. Predictive coding is used for highly correlated areas, and direct coding is used for areas with drastic changes, achieving a balance between compression efficiency and computational complexity.
[0138] The encapsulation of the network adaptation layer unit adopts a layered design. This embodiment adds an extension field to the unit header to carry the frame type identification and encryption tag information. These tags not only indicate how the data is processed, but also provide the necessary parameter information for the decryption end. The design of the tag takes backward compatibility into consideration to ensure that the decoder that has not been upgraded can still process the unencrypted video stream normally.
[0139] The real-time transport protocol encapsulation adopts an improved fragmentation strategy. This embodiment dynamically adjusts the fragmentation size according to the network bandwidth status, avoiding excessive fragmentation overhead while ensuring transmission efficiency. For important I frame data, a redundant transmission mechanism is implemented to improve transmission reliability.
[0140] The data transmission process realizes adaptive flow control. This embodiment dynamically adjusts the transmission rate and buffering strategy by monitoring the network status in real time. It actively reduces the bit rate when the network is congested, gives priority to the transmission of key frames, and ensures the basic availability of the video stream.
[0141] Through the above design, this embodiment achieves efficient reconstruction and reliable transmission of encrypted video data. This solution is particularly suitable for real-time application scenarios such as security monitoring, which not only ensures the security of video data but also maintains low transmission delay. In practical applications, the solution can adapt to different network environments and provide continuous video services even in the case of limited bandwidth. At the same time, the encryption marking mechanism ensures that authorized devices can correctly decrypt and play video content. Another significant advantage of the solution is that it supports hierarchical decryption, allowing users with different permissions to view video content of different clarity, which improves the practicality of the system.
[0142] In one embodiment of the video surveillance transmission method based on dual-channel communication and selective encryption of the present application, see Figure 7 , and can also include the following:
[0143] Step S701: Calculate the pixel difference between two adjacent frames of image data to obtain the image data change amount, obtain the level signal output by the human infrared sensor as the human infrared sensing signal, determine whether the image data change amount exceeds a preset threshold or whether the human infrared sensing signal is at a high level or whether a wake-up instruction issued by a remote server is received, and determine that the wake-up condition is met when any of the above conditions is met;
[0144] Step S702: Send an enable signal to the power supply circuit of the camera module, wait for the voltage of the camera module to stabilize, then turn on the clock of the image sensor, configure the register parameters of the image sensor, perform automatic exposure and automatic white balance adjustment, and turn on the video encoder for data encoding processing after the image sensor outputs stable image data.
[0145] Optionally, this embodiment designs a set of intelligent camera wake-up and startup solutions. First, the difference calculation of adjacent frame image data adopts a block processing strategy. The image is divided into multiple area blocks, and the pixel difference of each area is calculated respectively, and the overall change is obtained by weighted fusion. This partition calculation method not only improves the calculation efficiency, but also can accurately capture the motion changes of local areas.
[0146] The calculation of the change in image data uses an adaptive threshold mechanism. This embodiment dynamically adjusts the reference benchmark for difference calculation according to the ambient lighting conditions, improves tolerance in scenes with large lighting changes, and avoids false wake-ups caused by lighting fluctuations. At the same time, the contour extraction of moving targets is achieved, focusing on moving objects in the picture.
[0147] Human infrared sensing adopts a double verification mechanism. This embodiment eliminates the influence of environmental interference and instantaneous fluctuations by sampling and filtering the infrared signal in the time domain. After detecting a high-level signal, a short-term observation window is started to confirm the continuity and stability of the signal, thereby improving the reliability of detection.
[0148] The processing of remote wake-up instructions adopts a hierarchical response strategy. This embodiment sets a differentiated response mechanism for wake-up instructions of different priorities. Emergency alarm instructions have the highest priority and can trigger wake-up immediately; regular viewing instructions need to comprehensively consider the current device status and resource usage.
[0149] The power supply circuit is enabled by a soft start scheme. This embodiment designs a step-by-step voltage rise curve, and avoids the current shock at the start-up moment by accurately controlling the voltage slope. At the same time, power supply ripple suppression is achieved to ensure that the camera module obtains a stable operating voltage.
[0150] The clock enabling process introduces a preheating mechanism. This embodiment starts the low-frequency reference clock before starting the main clock, and then gradually increases it to the operating frequency after the oscillator reaches a stable state. This gradual clock switching strategy effectively avoids the problem of timing disorder.
[0151] The register configuration of the image sensor adopts a scenario-based preset solution. This embodiment pre-sets multiple groups of parameter configurations according to different application scenarios, including exposure time, gain control, color matrix, etc. At startup, the most suitable parameter group is selected according to the current environmental conditions, shortening the time for image quality adjustment.
[0152] The automatic exposure and white balance adjustment adopts a regional weighted algorithm. This embodiment intelligently partitions the image and assigns higher weights to key areas, making the exposure and color balance more in line with monitoring requirements. At the same time, a fast convergence mechanism is implemented to reduce adjustment time while ensuring image quality.
[0153] The video encoder is started using a progressive processing strategy. This embodiment first starts the encoder in low-resolution mode, and then gradually increases to the target resolution and frame rate after the entire image processing pipeline is stable. This smooth transition processing method ensures the continuity of the video stream.
[0154] Through the above design, this embodiment realizes intelligent wake-up and reliable startup of the camera system. This solution is particularly suitable for monitoring scenarios that require long-term standby, such as home security, warehouse monitoring, etc. Through the multi-dimensional wake-up trigger mechanism, it ensures that the system can respond in time when needed, while avoiding unnecessary wake-ups, effectively reducing system power consumption. Another notable feature of the solution is that it has strong environmental adaptability and can quickly reach the optimal working state under various lighting conditions, ensuring the quality of the monitoring image.
[0155] In order to significantly improve system energy efficiency while ensuring data security and provide a reliable technical solution for the field of video surveillance, the present application provides an embodiment of a video surveillance transmission device based on dual-channel communication and selective encryption for implementing all or part of the content of the video surveillance transmission method based on dual-channel communication and selective encryption, see Figure 8 The video surveillance transmission device based on dual-channel communication and selective encryption specifically includes the following contents:
[0156] The communication module 10 is used to build a video surveillance transmission system, connect the camera module, mobile communication module and main control module of the video surveillance transmission system to form a hardware architecture, configure the network access point, network address and port parameters of the mobile communication module, establish a video data transmission channel through the mobile communication module, configure the message queue telemetry transmission protocol parameters of the main control module, and establish a control signaling transmission channel through the main control module. The control signaling transmission channel is used to transmit device commands and status information;
[0157] The encryption module 20 is used to generate a unique identification code for each camera module in the video surveillance transmission system, calculate a device key based on the unique identification code, write the device key into a hardware security module for storage, collect video stream data output by the camera module, parse the video stream data according to the video coding standard to obtain key frames, prediction frames and bidirectional prediction frames, divide the key frames into multiple macroblocks, extract the DC coefficient representing the overall brightness and the AC coefficient representing the detail information in the macroblock, generate a first pseudo-random sequence based on the device key, perform an XOR operation on the first pseudo-random sequence and the DC coefficient to obtain an encrypted DC coefficient, generate a second pseudo-random sequence based on the device key, perform an XOR operation on the second pseudo-random sequence and the AC coefficient to obtain an encrypted AC coefficient, reconstruct the macroblock using the encrypted DC coefficient and the encrypted AC coefficient, package the reconstructed macroblock to obtain an encrypted video stream, and upload the encrypted video stream to a remote server through the video data transmission channel;
[0158] The monitoring module 30 is used to monitor the workload of the video surveillance transmission system in real time, control the camera module to switch to sleep mode when it is detected that there is no video viewing request within a preset time period, detect the change in image data collected by the camera module and the human infrared sensing signal, receive the wake-up instruction issued by the remote server, and determine whether the wake-up condition is met based on the change in image data, the human infrared sensing signal and the wake-up instruction; when the wake-up condition is met, restore the camera module from sleep mode to working mode.
[0159] From the above description, it can be seen that the video surveillance transmission device based on dual-channel communication and selective encryption provided by the embodiment of the present application can achieve efficient data transmission by building two independent channels for video data transmission and control signaling. The device unique identification and key management mechanism based on the hardware security module is innovatively adopted to selectively encrypt the key frames in the video stream, and only encrypt and protect the DC coefficient representing the overall brightness and the AC coefficient of the detail information. At the same time, an intelligent load monitoring and sleep wake-up mechanism is introduced to dynamically adjust the working state of the equipment based on video viewing requests, image changes and human body sensing signals. This method significantly improves the system energy efficiency while ensuring data security, providing a reliable technical solution for the field of video surveillance.
[0160] From the hardware level, in order to significantly improve system energy efficiency while ensuring data security and provide a reliable technical solution for the video surveillance field, the present application provides an embodiment of an electronic device for implementing all or part of the content of the video surveillance transmission method based on dual-channel communication and selective encryption, and the electronic device specifically includes the following content:
[0161] Processor, memory, communication interface and bus; wherein the processor, memory and communication interface communicate with each other through the bus; the communication interface is used to realize information transmission between the video surveillance transmission device based on dual-channel communication and selective encryption and the core business system, user terminal and related database and other related equipment; the logic controller can be a desktop computer, a tablet computer and a mobile terminal, etc., and the present embodiment is not limited thereto. In the present embodiment, the logic controller can be implemented with reference to the embodiment of the video surveillance transmission method based on dual-channel communication and selective encryption, and the embodiment of the video surveillance transmission device based on dual-channel communication and selective encryption in the embodiment, and the contents thereof are incorporated herein, and the repeated parts are not repeated.
[0162] It is understandable that the user terminal may include a smart phone, a tablet electronic device, a network set-top box, a portable computer, a desktop computer, a personal digital assistant (PDA), a vehicle-mounted device, a smart wearable device, etc. Among them, the smart wearable device may include smart glasses, a smart watch, a smart bracelet, etc.
[0163] In practical applications, part of the video surveillance transmission method based on dual-channel communication and selective encryption can be executed on the electronic device side as described above, or all operations can be completed in the client device. The selection can be made based on the processing capability of the client device and the limitations of the user's usage scenario. This application does not limit this. If all operations are completed in the client device, the client device may also include a processor.
[0164] The client device may have a communication module (i.e., a communication unit) that can communicate with a remote server to achieve data transmission with the server. The server may include a server on the task scheduling center side, and other implementation scenarios may also include a server on an intermediate platform, such as a server on a third-party server platform that has a communication link with the task scheduling center server. The server may include a single computer device, or a server cluster consisting of multiple servers, or a server structure of a distributed device.
[0165] Fig. 9 FIG. 9 is a schematic block diagram of the system structure of the electronic device 9600 according to an embodiment of the present application. Fig. 9 As shown, the electronic device 9600 may include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. It is worth noting that Fig. 9is exemplary; other types of structures may also be used to supplement or replace this structure to implement telecommunication functions or other functions.
[0166] In one embodiment, the video surveillance transmission method function based on dual-channel communication and selective encryption can be integrated into the central processor 9100. The central processor 9100 can be configured to perform the following control:
[0167] Step S101: Building a video surveillance transmission system, connecting the camera module, mobile communication module and main control module of the video surveillance transmission system to each other to form a hardware architecture, configuring the network access point, network address and port parameters of the mobile communication module, establishing a video data transmission channel through the mobile communication module, configuring the message queue telemetry transmission protocol parameters of the main control module, and establishing a control signaling transmission channel through the main control module, wherein the control signaling transmission channel is used to transmit device commands and status information;
[0168] Step S102: Generate a unique identification code for each camera module in the video surveillance transmission system, calculate a device key based on the unique identification code, write the device key into a hardware security module for storage, collect video stream data output by the camera module, parse the video stream data according to the video coding standard to obtain key frames, prediction frames and bidirectional prediction frames, divide the key frames into multiple macroblocks, extract the DC coefficient representing the overall brightness and the AC coefficient representing the detail information in the macroblock, generate a first pseudo-random sequence based on the device key, perform an XOR operation on the first pseudo-random sequence and the DC coefficient to obtain an encrypted DC coefficient, generate a second pseudo-random sequence based on the device key, perform an XOR operation on the second pseudo-random sequence and the AC coefficient to obtain an encrypted AC coefficient, reconstruct the macroblock using the encrypted DC coefficient and the encrypted AC coefficient, package the reconstructed macroblock to obtain an encrypted video stream, and upload the encrypted video stream to a remote server through the video data transmission channel;
[0169] Step S103: Monitor the workload of the video surveillance transmission system in real time, control the camera module to switch to sleep mode when it is detected that there is no video viewing request within a preset time period, detect the change in image data collected by the camera module and the human infrared sensing signal, receive a wake-up instruction issued by a remote server, and determine whether a wake-up condition is met based on the change in image data, the human infrared sensing signal and the wake-up instruction; and restore the camera module from sleep mode to working mode when the wake-up condition is met.
[0170] From the above description, it can be seen that the electronic device provided in the embodiment of the present application realizes efficient data transmission by building two independent channels for video data transmission and control signaling. The unique device identification and key management mechanism based on the hardware security module is innovatively adopted to selectively encrypt the key frames in the video stream, and only encrypt and protect the DC coefficient representing the overall brightness and the AC coefficient of the detail information. At the same time, an intelligent load monitoring and sleep wake-up mechanism is introduced to dynamically adjust the working state of the device based on video viewing requests, image changes and human body sensing signals. This method significantly improves the system energy efficiency while ensuring data security, providing a reliable technical solution for the field of video surveillance.
[0171] In another embodiment, the video surveillance transmission device based on dual-channel communication and selective encryption can be configured separately from the central processing unit 9100. For example, the video surveillance transmission device based on dual-channel communication and selective encryption can be configured as a chip connected to the central processing unit 9100, and the function of the video surveillance transmission method based on dual-channel communication and selective encryption can be realized through the control of the central processing unit.
[0172] like Fig. 9 As shown, the electronic device 9600 may also include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is worth noting that the electronic device 9600 does not necessarily have to include Fig. 9 In addition, the electronic device 9600 may also include Fig. 9 For components not shown, reference may be made to the prior art.
[0173] like Fig. 9 As shown, the central processing unit 9100 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor device and / or logic device, which receives input and controls the operation of various components of the electronic device 9600.
[0174] The memory 9140 may be, for example, one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices. The above-mentioned information related to the failure may be stored, and a program for executing the relevant information may also be stored. The CPU 9100 may execute the program stored in the memory 9140 to implement information storage or processing, etc.
[0175] The input unit 9120 provides input to the central processing unit 9100. The input unit 9120 is, for example, a key or a touch input device. The power supply 9170 is used to provide power to the electronic device 9600. The display 9160 is used to display display objects such as images and texts. The display may be, for example, an LCD display, but is not limited thereto.
[0176] The memory 9140 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that saves information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 9140 may also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application / function storage unit 9142, which is used to store application programs and function programs or processes for executing the operation of the electronic device 9600 through the central processor 9100.
[0177] The memory 9140 may also include a data storage unit 9143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 9144 of the memory 9140 may include various drivers for communication functions of the electronic device and / or for executing other functions of the electronic device (such as messaging applications, address book applications, etc.).
[0178] The communication module 9110 is a transmitter / receiver that sends and receives signals via the antenna 9111. The communication module 9110 (transmitter / receiver) is coupled to the central processor 9100 to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal.
[0179] Based on different communication technologies, multiple communication modules 9110 may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless LAN module. The communication module 9110 (transmitter / receiver) is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide an audio output via the speaker 9131 and receive an audio input from the microphone 9132, thereby realizing a common telecommunication function. The audio processor 9130 may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor 9130 is also coupled to the central processor 9100, so that recording can be performed on the local machine through the microphone 9132, and the sound stored on the local machine can be played through the speaker 9131.
[0180] The embodiments of the present application also provide a computer-readable storage medium capable of implementing all the steps in the video surveillance transmission method based on dual-channel communication and selective encryption in the above-mentioned embodiments, where the execution subject is a server or a client. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, all the steps in the video surveillance transmission method based on dual-channel communication and selective encryption in the above-mentioned embodiments are implemented. For example, when the processor executes the computer program, the following steps are implemented:
[0181] Step S101: Building a video surveillance transmission system, connecting the camera module, mobile communication module and main control module of the video surveillance transmission system to each other to form a hardware architecture, configuring the network access point, network address and port parameters of the mobile communication module, establishing a video data transmission channel through the mobile communication module, configuring the message queue telemetry transmission protocol parameters of the main control module, and establishing a control signaling transmission channel through the main control module, wherein the control signaling transmission channel is used to transmit device commands and status information;
[0182] Step S102: Generate a unique identification code for each camera module in the video surveillance transmission system, calculate a device key based on the unique identification code, write the device key into a hardware security module for storage, collect video stream data output by the camera module, parse the video stream data according to the video coding standard to obtain key frames, prediction frames and bidirectional prediction frames, divide the key frames into multiple macroblocks, extract the DC coefficient representing the overall brightness and the AC coefficient representing the detail information in the macroblock, generate a first pseudo-random sequence based on the device key, perform an XOR operation on the first pseudo-random sequence and the DC coefficient to obtain an encrypted DC coefficient, generate a second pseudo-random sequence based on the device key, perform an XOR operation on the second pseudo-random sequence and the AC coefficient to obtain an encrypted AC coefficient, reconstruct the macroblock using the encrypted DC coefficient and the encrypted AC coefficient, package the reconstructed macroblock to obtain an encrypted video stream, and upload the encrypted video stream to a remote server through the video data transmission channel;
[0183] Step S103: Monitor the workload of the video surveillance transmission system in real time, control the camera module to switch to sleep mode when it is detected that there is no video viewing request within a preset time period, detect the change in image data collected by the camera module and the human infrared sensing signal, receive a wake-up instruction issued by a remote server, and determine whether a wake-up condition is met based on the change in image data, the human infrared sensing signal and the wake-up instruction; and restore the camera module from sleep mode to working mode when the wake-up condition is met.
[0184] From the above description, it can be seen that the computer-readable storage medium provided in the embodiment of the present application realizes efficient data transmission by building two independent channels for video data transmission and control signaling. The unique device identification and key management mechanism based on the hardware security module is innovatively adopted to selectively encrypt the key frames in the video stream, and only encrypt and protect the DC coefficient representing the overall brightness and the AC coefficient of the detail information. At the same time, an intelligent load monitoring and sleep wake-up mechanism is introduced to dynamically adjust the working state of the device based on video viewing requests, image changes and human body sensing signals. This method significantly improves the system energy efficiency while ensuring data security, providing a reliable technical solution for the field of video surveillance.
[0185] The embodiments of the present application also provide a computer program product capable of implementing all the steps in the video surveillance transmission method based on dual-channel communication and selective encryption in the above embodiments, where the execution subject is a server or a client. When the computer program / instruction is executed by a processor, the steps of the video surveillance transmission method based on dual-channel communication and selective encryption are implemented. For example, the computer program / instruction implements the following steps:
[0186] Step S101: Building a video surveillance transmission system, connecting the camera module, mobile communication module and main control module of the video surveillance transmission system to each other to form a hardware architecture, configuring the network access point, network address and port parameters of the mobile communication module, establishing a video data transmission channel through the mobile communication module, configuring the message queue telemetry transmission protocol parameters of the main control module, and establishing a control signaling transmission channel through the main control module, wherein the control signaling transmission channel is used to transmit device commands and status information;
[0187] Step S102: Generate a unique identification code for each camera module in the video surveillance transmission system, calculate a device key based on the unique identification code, write the device key into a hardware security module for storage, collect video stream data output by the camera module, parse the video stream data according to the video coding standard to obtain key frames, prediction frames and bidirectional prediction frames, divide the key frames into multiple macroblocks, extract the DC coefficient representing the overall brightness and the AC coefficient representing the detail information in the macroblock, generate a first pseudo-random sequence based on the device key, perform an XOR operation on the first pseudo-random sequence and the DC coefficient to obtain an encrypted DC coefficient, generate a second pseudo-random sequence based on the device key, perform an XOR operation on the second pseudo-random sequence and the AC coefficient to obtain an encrypted AC coefficient, reconstruct the macroblock using the encrypted DC coefficient and the encrypted AC coefficient, package the reconstructed macroblock to obtain an encrypted video stream, and upload the encrypted video stream to a remote server through the video data transmission channel;
[0188] Step S103: Monitor the workload of the video surveillance transmission system in real time, control the camera module to switch to sleep mode when it is detected that there is no video viewing request within a preset time period, detect the change in image data collected by the camera module and the human infrared sensing signal, receive a wake-up instruction issued by a remote server, and determine whether a wake-up condition is met based on the change in image data, the human infrared sensing signal and the wake-up instruction; and restore the camera module from sleep mode to working mode when the wake-up condition is met.
[0189] From the above description, it can be seen that the computer program product provided in the embodiment of the present application realizes efficient data transmission by building two independent channels for video data transmission and control signaling. The unique device identification and key management mechanism based on the hardware security module is innovatively adopted to selectively encrypt the key frames in the video stream, and only encrypt and protect the DC coefficient representing the overall brightness and the AC coefficient of the detail information. At the same time, an intelligent load monitoring and sleep wake-up mechanism is introduced to dynamically adjust the working state of the device based on video viewing requests, image changes and human body sensing signals. This method significantly improves the system energy efficiency while ensuring data security, providing a reliable technical solution for the field of video surveillance.
[0190] It should be understood by those skilled in the art that embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0191] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (apparatus), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0192] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0193] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0194] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A video surveillance transmission method based on dual-channel communication and selective encryption, characterized in that: The method comprises: Building a video surveillance transmission system, interconnecting the camera module, mobile communication module and main control module of the video surveillance transmission system to form a hardware architecture, configuring the network access point, network address and port parameters of the mobile communication module, establishing a video data transmission channel through the mobile communication module, configuring the message queue telemetry transmission protocol parameters of the main control module, and establishing a control signaling transmission channel through the main control module, wherein the control signaling transmission channel is used to transmit device commands and status information; Generate a unique identification code for each camera module in the video surveillance transmission system, calculate a device key based on the unique identification code, write the device key into a hardware security module for storage, collect video stream data output by the camera module, parse the video stream data according to the video coding standard to obtain key frames, prediction frames and bidirectional prediction frames, divide the key frames into multiple macroblocks, extract the DC coefficient representing the overall brightness and the AC coefficient representing the detail information in the macroblock, generate a first pseudo-random sequence based on the device key, perform an XOR operation on the first pseudo-random sequence and the DC coefficient to obtain an encrypted DC coefficient, generate a second pseudo-random sequence based on the device key, perform an XOR operation on the second pseudo-random sequence and the AC coefficient to obtain an encrypted AC coefficient, reconstruct the macroblock using the encrypted DC coefficient and the encrypted AC coefficient, package the reconstructed macroblock to obtain an encrypted video stream, and upload the encrypted video stream to a remote server through the video data transmission channel; The workload of the video surveillance transmission system is monitored in real time. When it is detected that there is no video viewing request within a preset time period, the camera module is controlled to switch to sleep mode, the change in image data collected by the camera module and the human infrared sensing signal are detected, and a wake-up instruction issued by a remote server is received. Based on the change in image data, the human infrared sensing signal and the wake-up instruction, it is determined whether a wake-up condition is met, and when the wake-up condition is met, the camera module is restored from sleep mode to working mode.
2. The video surveillance transmission method based on dual-channel communication and selective encryption according to claim 1 is characterized in that: The method of generating a unique identification code for each camera module in the video surveillance transmission system, calculating a device key based on the unique identification code, and writing the device key into a hardware security module for storage includes: Obtaining a physical address and a device serial number of the camera module, concatenating the physical address and the device serial number to form a string to be encrypted, using a hash algorithm to calculate a hash value for the string to be encrypted, and generating the unique identification code based on the hash value; The unique identification code is input as a seed key into a key generation function, a master key is calculated and generated by the key generation function, the master key is segmented to obtain multiple sub-keys, the sub-keys are written in sequence into a designated storage area of the hardware security module, and the read-write protection attributes of the storage area are configured.
3. The video surveillance transmission method based on dual-channel communication and selective encryption according to claim 1 is characterized in that: The collecting of the video stream data output by the camera module, parsing the video stream data according to the video coding standard to obtain key frames, prediction frames and bidirectional prediction frames, dividing the key frames into a plurality of macroblocks, and extracting the DC coefficient representing the overall brightness and the AC coefficient representing the detail information in the macroblocks, including: The original image data is collected by the image sensor of the camera module, the original image data is converted into a luminance component and a chrominance component by color space conversion, video stream data is generated according to the luminance component and the chrominance component, the video stream data is decoded according to the frame type identifier and the inter-frame reference relationship specified in the video coding standard, and the decoded data is classified into key frames, predicted frames and bidirectional predicted frames; The key frame is divided into multiple macroblocks according to a preset pixel matrix size, and a two-dimensional discrete cosine transform is performed on each macroblock to obtain a frequency domain coefficient matrix. The DC coefficient at the upper left corner position is extracted from the frequency domain coefficient matrix as the coefficient representing the overall brightness, and the AC coefficients at the remaining positions are extracted as the coefficients representing the detail information.
4. The video surveillance transmission method based on dual-channel communication and selective encryption according to claim 1 is characterized in that: The step of generating a first pseudo-random sequence based on the device key and performing an XOR operation on the first pseudo-random sequence and the DC coefficient to obtain an encrypted DC coefficient includes: Reading the device key from the hardware security module, combining the device key with a system timestamp to obtain a seed value, inputting the seed value into a linear congruential random number generator, and calculating and generating a first pseudo-random sequence having a length matching the DC coefficient through the linear congruential random number generator; The DC coefficient is converted into a binary bit stream, the first pseudo-random sequence is normalized to obtain a binary random bit stream, the binary random bit stream is bit-wise XOR-ed with the binary bit stream of the DC coefficient, and the XOR-ed result is converted back to the original numerical representation to obtain the encrypted DC coefficient.
5. The video surveillance transmission method based on dual-channel communication and selective encryption according to claim 1 is characterized in that: The generating a second pseudo-random sequence based on the device key, and performing an XOR operation on the second pseudo-random sequence and the AC coefficient to obtain the encrypted AC coefficient, comprises: Reading the device key from the hardware security module, combining the device key with the current frame number to obtain an initial vector, constructing a state matrix based on the initial vector, generating a chaotic mapping sequence through iterative calculation of the state matrix, and quantizing the chaotic mapping sequence to obtain a second pseudo-random sequence whose length matches the AC coefficient; The AC coefficients are rearranged into a one-dimensional sequence in a zigzag scanning order, the one-dimensional sequence is run-length encoded to obtain a compressed bit stream, the second pseudo-random sequence is converted into a binary sequence of the same length, an XOR operation is performed on the binary sequence and the compressed bit stream, and the XOR operation result is decoded and restored to obtain the encrypted AC coefficients.
6. The video surveillance transmission method based on dual-channel communication and selective encryption according to claim 1 is characterized in that: The step of reconstructing the macroblock by using the encrypted DC coefficient and the encrypted AC coefficient, packaging the reconstructed macroblock to obtain an encrypted video stream, and uploading the encrypted video stream to a remote server through the video data transmission channel comprises: Fill the encrypted DC coefficient to the upper left corner of the frequency domain coefficient matrix, fill the encrypted AC coefficient to the remaining positions of the frequency domain coefficient matrix according to a specified scanning order, perform a two-dimensional inverse discrete cosine transform on the filled frequency domain coefficient matrix to obtain reconstructed macroblock data, and write the reconstructed macroblock data into the frame buffer according to the position information of the original macroblock; The reconstructed macroblock data is read from the frame buffer, the macroblock data is entropy encoded to obtain a bitstream, the bitstream is encapsulated into a network adaptation layer unit, a frame type identifier and an encryption tag are added to the network adaptation layer unit, the marked network adaptation layer unit is organized into a real-time transport protocol data packet, and the real-time transport protocol data packet is sent to the remote server through the video data transmission channel.
7. The video surveillance transmission method based on dual-channel communication and selective encryption according to claim 1 is characterized in that: The determining whether a wake-up condition is met based on the image data change amount, the human infrared sensing signal and the wake-up instruction, and restoring the camera module from a sleep mode to a working mode when the wake-up condition is met, comprises: Calculate the pixel difference between two adjacent frames of image data to obtain the image data change amount, obtain the level signal output by the human infrared sensor as the human infrared sensing signal, determine whether the image data change amount exceeds a preset threshold or whether the human infrared sensing signal is at a high level or whether a wake-up instruction issued by a remote server is received, and determine that the wake-up condition is met when any of the above conditions is met; An enable signal is sent to the power supply circuit of the camera module, and the clock of the image sensor is turned on after the voltage of the camera module is stabilized, the register parameters of the image sensor are configured, automatic exposure and automatic white balance adjustment are performed, and the video encoder is turned on for data encoding processing after the image sensor outputs stable image data.
8. A video surveillance transmission device based on dual-channel communication and selective encryption, characterized in that: The device comprises: A communication module is used to build a video surveillance transmission system, interconnect the camera module, mobile communication module and main control module of the video surveillance transmission system to form a hardware architecture, configure the network access point, network address and port parameters of the mobile communication module, establish a video data transmission channel through the mobile communication module, configure the message queue telemetry transmission protocol parameters of the main control module, establish a control signaling transmission channel through the main control module, and the control signaling transmission channel is used to transmit device commands and status information; An encryption module is used to generate a unique identification code for each camera module in the video surveillance transmission system, calculate a device key based on the unique identification code, write the device key into a hardware security module for storage, collect video stream data output by the camera module, parse the video stream data according to the video coding standard to obtain key frames, prediction frames and bidirectional prediction frames, divide the key frames into multiple macroblocks, extract the DC coefficient representing the overall brightness and the AC coefficient representing the detail information in the macroblock, generate a first pseudo-random sequence based on the device key, perform an XOR operation on the first pseudo-random sequence and the DC coefficient to obtain an encrypted DC coefficient, generate a second pseudo-random sequence based on the device key, perform an XOR operation on the second pseudo-random sequence and the AC coefficient to obtain an encrypted AC coefficient, reconstruct the macroblock using the encrypted DC coefficient and the encrypted AC coefficient, package the reconstructed macroblock to obtain an encrypted video stream, and upload the encrypted video stream to a remote server through the video data transmission channel; The monitoring module is used to monitor the workload of the video monitoring transmission system in real time, control the camera module to switch to sleep mode when it is detected that there is no video viewing request within a preset time period, detect the change in image data collected by the camera module and the human infrared sensing signal, receive the wake-up instruction issued by the remote server, judge whether the wake-up condition is met based on the change in image data, the human infrared sensing signal and the wake-up instruction, and restore the camera module from sleep mode to working mode when the wake-up condition is met.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the video surveillance transmission method based on dual-channel communication and selective encryption as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the video surveillance transmission method based on dual-channel communication and selective encryption as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Video ciphering method based on high class ciphering standard
CN101304525A
Method for encrypting video streaming information based on hyper-chaotic sequence
CN102176759A
Cited By
A video terminal network security protection method and system
CN120730011B