CN117395466B - Video transmission real-time monitoring method and system and electronic equipment - Google Patents

Video transmission real-time monitoring method and system and electronic equipment Download PDF

Info

Publication number
CN117395466B
CN117395466B CN202311313197.XA CN202311313197A CN117395466B CN 117395466 B CN117395466 B CN 117395466B CN 202311313197 A CN202311313197 A CN 202311313197A CN 117395466 B CN117395466 B CN 117395466B
Authority
CN
China
Prior art keywords
rtp
data
video data
packets
control information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311313197.XA
Other languages
Chinese (zh)
Other versions
CN117395466A (en
Inventor
卢可任
张栋
崔大鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenbang Intelligent Technology Group Qingdao Co ltd
Original Assignee
Shenbang Intelligent Technology Group Qingdao Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenbang Intelligent Technology Group Qingdao Co ltd filed Critical Shenbang Intelligent Technology Group Qingdao Co ltd
Priority to CN202311313197.XA priority Critical patent/CN117395466B/en
Publication of CN117395466A publication Critical patent/CN117395466A/en
Application granted granted Critical
Publication of CN117395466B publication Critical patent/CN117395466B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4408Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving video stream encryption, e.g. re-encrypting a decrypted video stream for redistribution in a home network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/41Structure of client; Structure of client peripherals
    • H04N21/422Input-only peripherals, i.e. input devices connected to specially adapted client devices, e.g. global positioning system [GPS]
    • H04N21/42204User interfaces specially adapted for controlling a client device through a remote control device; Remote control devices therefor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440218Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4405Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving video stream decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/462Content or additional data management, e.g. creating a master electronic program guide from data received from the Internet and a Head-end, controlling the complexity of a video stream by scaling the resolution or bit-rate based on the client capabilities
    • H04N21/4627Rights management associated to the content
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols
    • H04N21/6437Real-time Transport Protocol [RTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Human Computer Interaction (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The embodiment of the application provides a real-time monitoring method and system for video transmission and electronic equipment, and relates to the technical field of communication. The real-time monitoring method of the video data comprises the steps of obtaining first video data, and encoding and format converting the first video data to obtain second video data; obtaining a plurality of first RTP data packets based on the second video data; then encrypting, and adding access control information for each encrypted second RTP data packet; transmitting a plurality of second RTP data packets and corresponding access control information to a receiving end; the control receiving end receives the access control information, and decrypts the plurality of second RTP data packets to obtain a plurality of third RTP data packets under the condition that the access control information is subjected to access right verification and passes the verification; and then decoding to obtain first video data, and displaying the video on display equipment of a receiving end. The embodiment of the application can enhance the safety of video data in the video transmission process.

Description

Video transmission real-time monitoring method and system and electronic equipment
Technical Field
The application relates to the technical field of communication, in particular to a real-time monitoring method and system for video transmission and electronic equipment.
Background
At present, the real-time monitoring of video transmission refers to monitoring and managing processes of video signal acquisition, encoding, transmission, decoding, playing and the like through a series of technologies and equipment.
Under the related technology, the HTTP protocol is used to transmit video data, the video data needs to be collected and encoded first, the encoded video data is divided into small data blocks, an HTTP server is built, and all the small data blocks are uploaded to the HTTP server. The client downloads the data blocks from the server through the HTTP request, combines the data blocks to obtain encoded video data, decodes the encoded video data, and plays the decoded video data. However, in the process of using HTTP protocol to perform video transmission, there are problems such as data tampering and data interception, which can reduce the security of video data in the process of video transmission.
Therefore, a real-time monitoring method, system and electronic device for video transmission are needed to solve the problems of data tampering, data interception, etc. which can reduce the security of video data in the video transmission process.
Disclosure of Invention
The application provides a real-time monitoring method, a system and electronic equipment for video transmission, which can enhance the safety of video data in the video transmission process.
In a first aspect, an embodiment of the present application provides a method for monitoring video transmission in real time, applied to a transmitting end, where the method includes:
acquiring first video data, encoding the first video data by using a preset encoding method, and performing format conversion on the video data obtained by encoding according to a preset first format to obtain second video data;
obtaining a plurality of first RTP data packets based on the second video data;
Encrypting a plurality of first RTP data packets by using a preset encryption algorithm to obtain a plurality of second RTP data packets, adding access control information for each second RTP data packet, and adding a key of the preset encryption algorithm into the access control information;
Transmitting a plurality of second RTP data packets and the access control information corresponding to each second RTP data packet to a receiving end, wherein the access control information is used for verifying the access authority of the receiving end;
Controlling the receiving end to receive a plurality of second RTP data packets and the access control information corresponding to each second RTP data packet, performing access right verification on the access control information, and decrypting the plurality of second RTP data packets by using a preset decryption algorithm under the condition that the access right verification is passed to obtain a plurality of third RTP data packets;
and controlling the receiving end, decoding a plurality of third RTP data packets by using a preset decoding method to obtain the first video data, and displaying the first video data on display equipment of the receiving end.
By adopting the technical scheme, the first video data is acquired, the first video data is encoded by utilizing a preset encoding method, the format of the encoded video data is converted according to a preset first format to obtain the second video data, the size of the second video data is smaller, the second video data is more suitable for being transmitted on a network, and the transmission speed and the stability are better; obtaining a plurality of first RTP data packets based on the second video data; encrypting the plurality of first RTP data packets by using a preset encryption algorithm to obtain a plurality of second RTP data packets, adding access control information for each second RTP data packet, and adding a key of the preset encryption algorithm to the access control information; the plurality of second RTP data packets and access control information corresponding to each second RTP data packet are sent to a receiving end, the access control information is used for verifying the access right of the receiving end, the plurality of first RTP data packets are encrypted by using an encryption algorithm, and the secret key of the encryption algorithm is added to the access control information, so that the safety of video data can be improved; the control receiving end receives the second RTP data packets and access control information corresponding to the second RTP data packets, performs access right verification on the access control information, decrypts the second RTP data packets by using a preset decryption algorithm under the condition that the access right verification is passed, obtains third RTP data packets, decrypts the second RTP data packets by using the preset decryption algorithm only after the verification of the access control information, and can ensure the safety of the data decryption process; and controlling the receiving end, decoding a plurality of third RTP data packets by using a preset decoding method to obtain first video data, and displaying the first video data on display equipment of the receiving end, so that the user can watch the first video data conveniently. In the prior art, real-time monitoring of video transmission cannot be realized by using an HTTP protocol, but the embodiment of the application can enhance the safety of video data in the video transmission process by using RTP and RTCP protocols to realize the real-time monitoring of video transmission and adding data encryption and decryption operations and access control information.
In some embodiments of the present application, the obtaining the first video data, encoding the first video data by using a preset encoding method, and performing format conversion on the encoded video data according to a preset first format to obtain second video data, where the method includes:
acquiring first video data, and preprocessing the first video data to obtain third video data;
and encoding the third video data by using a preset encoding method, and converting the format of the encoded video data according to a preset first format to obtain second video data.
By adopting the technical scheme, the first video data is obtained, and is preprocessed to obtain the third video data, so that the video quality and the video impression can be improved; and the third video data is encoded by using a preset encoding method, and the video data obtained by encoding is subjected to format conversion according to a preset first format to obtain second video data, wherein the second video data is smaller in size, more suitable for being transmitted on a network and better in transmission speed and stability.
In some embodiments of the present application, the obtaining a plurality of first RTP packets based on the second video data includes:
dividing the second video data into a plurality of data blocks according to a preset dividing method, and taking the plurality of data blocks as effective load data;
And creating RTP header parts for each payload data, and combining the RTP header parts corresponding to the payload data with the payload data to obtain a plurality of first RTP data packets.
By adopting the technical scheme, the second video data is segmented into a plurality of data blocks according to the preset segmentation method, the plurality of data blocks are used as effective load data, and the video data is segmented, so that the video data transmission efficiency can be improved; and creating RTP header parts for each payload data, and combining the RTP header parts corresponding to each payload data with the payload data to obtain a plurality of first RTP data packets, so that conditions can be provided for subsequent data encryption.
In some embodiments of the present application, encrypting the plurality of first RTP packets using a preset encryption algorithm to obtain a plurality of second RTP packets, adding access control information to each of the second RTP packets, and adding a key of the preset encryption algorithm to the access control information includes:
Determining a key of an encryption algorithm according to a preset encryption algorithm;
Creating an encryptor object according to the preset encryption algorithm and the secret key, and initializing the encryptor object to obtain an initial encryptor object;
Encrypting each first RTP data packet by using the initial encryptor object to obtain a plurality of second RTP data packets;
And adding access control information to each second RTP data packet, and adding the key to the access control information.
By adopting the technical scheme, the key of the encryption algorithm is determined according to a preset encryption algorithm; creating an encryptor object according to a preset encryption algorithm and a key, and initializing the encryptor object to obtain an initial encryptor object; encrypting each first RTP data packet by using an initial encryptor object to obtain a plurality of second RTP data packets, so that the security of the data packets can be enhanced; and adding access control information to each second RTP data packet and adding the secret key to the access control information, so that the security of the secret key can be ensured.
In some embodiments of the present application, after the controlling the receiving end to receive the plurality of second RTP packets and the access control information corresponding to each of the second RTP packets, the method further includes:
Controlling the receiving end to generate RTCP feedback information and sending the RTCP feedback information to the sending end;
Receiving the RTCP feedback information, and analyzing statistical information in the RTCP feedback information to obtain an analysis result, wherein the statistical information is obtained by controlling the receiving end to count a plurality of second RTP data packets;
Judging the current network state according to the analysis result;
under the condition of poor network state, reducing the sending rate of RTP data packets or simplifying the coding method;
under the condition of better network state, the sending rate of RTP data packets is increased or the coding method is complicated.
By adopting the technical scheme, the receiving end is controlled to generate RTCP feedback information, and the RTCP feedback information is sent to the sending end, so that the receiving condition of the RTP data packet can be obtained; receiving RTCP feedback information, and analyzing statistical information in the RTCP feedback information to obtain an analysis result, wherein the statistical information is obtained by controlling a receiving end to count a plurality of second RTP data packets, and the receiving condition of the RTP data packets can be further analyzed and calculated to obtain information capable of judging the current network state; judging the current network state according to the analysis result; under the condition of poor network state, the transmission rate of RTP data packets is reduced or the coding method is simplified, so that the network load can be reduced, and the stability of data transmission is improved; under the condition of better network state, the transmission rate of RTP data packets is increased or the coding method is complicated, so that the data transmission rate can be increased.
In some embodiments of the present application, the controlling the receiving end to receive the plurality of second RTP packets and the access control information corresponding to each of the second RTP packets, perform access right verification on the access control information, and decrypt the plurality of second RTP packets by using a preset decryption algorithm to obtain a plurality of third RTP packets if the access right verification passes, where the method includes:
Controlling the receiving end to receive a plurality of second RTP data packets and the access control information corresponding to each second RTP data packet, and verifying the access right of the access control information;
reading the key from the access control information under the condition that the access authority verification is passed;
creating a decryptor object according to the preset decryption algorithm and the secret key, and initializing the decryptor object to obtain an initial decryptor object;
And decrypting each second RTP data packet by using the initial decryptor object to obtain a plurality of third RTP data packets.
By adopting the technical scheme, the control receiving end receives a plurality of second RTP data packets and access control information corresponding to each second RTP data packet, and performs access right verification on the access control information, so that the access right on the access control information can be verified; under the condition that the access authority verification is passed, a key is read from the access control information, and the next data decryption can be carried out by using the key of the encryption algorithm only through the authority verification of the access control information, so that conditions can be provided for subsequent data decryption; creating a decryptor object according to a preset decryption algorithm and a key, and initializing the decryptor object to obtain an initial decryptor object; and decrypting each second RTP data packet by using the initial decryptor object to obtain a plurality of third RTP data packets, and providing conditions for subsequent data decoding.
In some embodiments of the present application, after the controlling the receiving end decodes the plurality of third RTP packets by using a preset decoding method to obtain the first video data, and displays the first video data on a display device of the receiving end, the method further includes:
The control instruction is triggered by the display equipment of the receiving end to be obtained by clicking operation of a user on the display equipment, and the control instruction is sent to the sending end;
And receiving the control instruction, adjusting the playing state of the first video data according to the control parameter in the control instruction, sending the adjusted first video data to the receiving end, and displaying the first video data on the display equipment.
By adopting the technical scheme, the control instruction sent by the display equipment of the receiving end is controlled, the control instruction is triggered by the click operation of the display equipment by a user through the display equipment, and the control instruction is sent to the sending end; receiving a control instruction, adjusting the playing state of the first video data according to the control parameter in the control instruction, sending the adjusted first video data to a receiving end, displaying the first video data on a display device, and flexibly controlling the playing state of the video according to the requirement of a user.
In a second aspect, the present application provides a real-time monitoring system for video transmission, applied to a transmitting end, where the system includes:
The data acquisition module is used for acquiring first video data, encoding the first video data by using a preset encoding method, and converting the format of the encoded video data according to a preset first format to obtain second video data;
The data packetizing module is used for obtaining a plurality of first RTP data packets based on the second video data;
The data encryption module is used for encrypting the plurality of first RTP data packets by using a preset encryption algorithm to obtain a plurality of second RTP data packets, adding access control information for each second RTP data packet, and adding a key of the preset encryption algorithm into the access control information;
The data transmission module is used for transmitting a plurality of second RTP data packets and the access control information corresponding to each second RTP data packet to a receiving end, wherein the access control information is used for verifying the access authority of the receiving end;
The data decryption module is used for controlling the receiving end to receive a plurality of second RTP data packets and the access control information corresponding to each second RTP data packet, carrying out access right verification on the access control information, and decrypting the plurality of second RTP data packets by using a preset decryption algorithm under the condition that the access right verification is passed to obtain a plurality of third RTP data packets;
And the data decoding module is used for controlling the receiving end, decoding a plurality of third RTP data packets by using a preset decoding method to obtain the first video data, and displaying the first video data on display equipment of the receiving end.
By adopting the system, the data acquisition module is called to acquire the first video data, the first video data is encoded by utilizing a preset encoding method, the format of the encoded video data is converted according to a preset first format to obtain the second video data, the second video data is smaller in size, more suitable for being transmitted on a network, and better in transmission speed and stability; calling a data packetizing module to obtain a plurality of first RTP data packets based on the second video data; the method comprises the steps of calling a data encryption module to encrypt a plurality of first RTP data packets by using a preset encryption algorithm to obtain a plurality of second RTP data packets, adding access control information for each second RTP data packet, and adding a key of the preset encryption algorithm to the access control information; the data transmission module is called to send a plurality of second RTP data packets and access control information corresponding to each second RTP data packet to the receiving end, the access control information is used for verifying the access right of the receiving end, the encryption algorithm is used for encrypting the plurality of first RTP data packets, and the secret key of the encryption algorithm is added to the access control information, so that the safety of video data can be improved; the calling data decryption module controls the receiving end to receive a plurality of second RTP data packets and access control information corresponding to each second RTP data packet, performs access right verification on the access control information, decrypts the plurality of second RTP data packets by using a preset decryption algorithm under the condition that the access right verification is passed, obtains a plurality of third RTP data packets, and can decrypt the plurality of second RTP data packets by using the preset decryption algorithm only by verifying the access control information, so that the safety of a data decryption process can be ensured; the data decoding module is called to control the receiving end, a plurality of third RTP data packets are decoded by using a preset decoding method to obtain first video data, and the first video data is displayed on display equipment of the receiving end, so that the user can watch the first video data conveniently. In the prior art, real-time monitoring of video transmission cannot be realized by using an HTTP protocol, but the embodiment of the application can enhance the safety of video data in the video transmission process by using RTP and RTCP protocols to realize the real-time monitoring of video transmission and adding data encryption and decryption operations and access control information.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, a user interface, and a network interface, where the memory is configured to store instructions, and the user interface and the network interface are configured to communicate with other devices, and the processor is configured to execute the instructions stored in the memory, so that the electronic device performs the method provided in any one of the first aspect.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing instructions that, when executed, perform the method of any one of the first aspects provided above.
In summary, one or more technical solutions provided in the embodiments of the present application at least have the following technical effects or advantages:
1. Acquiring first video data, encoding the first video data by using a preset encoding method, and performing format conversion on the video data obtained by encoding according to a preset first format to obtain second video data; obtaining a plurality of first RTP data packets based on the second video data; encrypting the plurality of first RTP data packets by using a preset encryption algorithm to obtain a plurality of second RTP data packets, adding access control information for each second RTP data packet, and adding a key of the preset encryption algorithm to the access control information; transmitting a plurality of second RTP data packets and access control information corresponding to each second RTP data packet to a receiving end, wherein the access control information is used for verifying the access authority of the receiving end; the control receiving end receives the second RTP data packets and access control information corresponding to the second RTP data packets, performs access right verification on the access control information, and decrypts the second RTP data packets by using a preset decryption algorithm under the condition that the access right verification is passed to obtain third RTP data packets; and controlling the receiving end, decoding the plurality of third RTP data packets by using a preset decoding method to obtain first video data, and displaying the first video data on display equipment of the receiving end. In the prior art, the real-time monitoring of video transmission cannot be realized by using the HTTP protocol, and the embodiment of the application uses RTP and RTCP protocols to realize the real-time monitoring of video transmission and adds data encryption and decryption operation and access control information, so that the security of video data in the video transmission process can be enhanced.
2. Acquiring first video data, and preprocessing the first video data to obtain third video data; and the third video data is encoded by using a preset encoding method, and the video data obtained by encoding is subjected to format conversion according to a preset first format to obtain second video data, so that the quality and the look and feel of the video can be improved, and the video data can be conveniently transmitted on a network.
3. Determining a key of an encryption algorithm according to a preset encryption algorithm; creating an encryptor object according to a preset encryption algorithm and a key, and initializing the encryptor object to obtain an initial encryptor object; encrypting each first RTP data packet by using the initial encryptor object to obtain a plurality of second RTP data packets; and adding access control information to each second RTP data packet and adding the secret key to the access control information can enhance the security of the data packet and ensure the security of the secret key.
4. The control instruction is triggered by the display equipment of the receiving end to be obtained by clicking operation of a user on the display equipment, and the control instruction is sent to the sending end; receiving a control instruction, adjusting the playing state of the first video data according to the control parameter in the control instruction, sending the adjusted first video data to a receiving end, displaying the first video data on a display device, and flexibly controlling the playing state of the video according to the requirement of a user.
Drawings
Fig. 1 is a schematic flow chart of a real-time monitoring method for video transmission according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of a sub-step of step S3 in FIG. 1;
FIG. 3 is a schematic flow chart of a sub-step of step S4 in FIG. 1;
FIG. 4 is a schematic flow chart of a sub-step of step S5 in FIG. 1;
FIG. 5 is a second flow chart of a method for monitoring video transmission in real time according to the embodiment of the application;
fig. 6 is a schematic structural diagram of a real-time monitoring system for video transmission according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments.
In describing embodiments of the present application, words such as "for example" or "for example" are used to mean serving as examples, illustrations, or descriptions. Any embodiment or design described herein as "such as" or "for example" in embodiments of the application should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "or" for example "is intended to present related concepts in a concrete fashion.
In the description of embodiments of the application, the term "plurality" means two or more. For example, a plurality of systems means two or more systems, and a plurality of screen terminals means two or more screen terminals. Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating an indicated technical feature. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
Before describing embodiments of the present application in further detail, the terms and terminology involved in the embodiments of the present application will be described, and the terms and terminology involved in the embodiments of the present application will be used in the following explanation.
RTP protocol (Real-time Transport Protocol ), a network protocol, is used for Real-time data transmission, such as audio and video streaming, over the internet. RTP is commonly used for real-time streaming applications such as video conferencing, online live streaming, etc. RTP provides a framework for transmitting real-time data, including audio and video data, over the internet. It defines the format and transport mechanism of the data packet and can be used with other transport protocols such as UDP. RTP itself does not provide quality of service guarantees or packet ordering, which functions need to be implemented by upper layer protocols or applications.
The RTCP protocol (Real-time Transport Control Protocol ) is a protocol used in conjunction with RTP (Real-time Transport Protocol). The primary function of RTCP is to provide flow control and congestion control services, similar to the data transmission control services provided by TCP (Transmission Control Protocol). RTCP provides information about streaming media, such as transmission statistics, participant information, etc., by periodically sending control packets between the participants. Such information may help participants to understand network quality and quality of service, making necessary adjustments and optimizations to ensure the quality and stability of transmission of real-time data.
RTSP Protocol (REAL TIME STREAMING Protocol, network streaming Protocol) is used to control the transmission of real-time data streams. RTSP is commonly used for audio and video playback control, such as play, pause, fast forward, fast reverse, etc. The RTSP protocol defines a set of communication commands for interaction between a client and a server. These commands include OPTIONS, DESCRIBE, PLAY, PAUSE, SETUP, etc. Through these commands, the client can send requests to the server, control the transmission of real-time data, and obtain information about the streaming media.
One of the video and audio lossy compression standards established by the MPEG-2, MPEG (Moving Picture Experts Group ) organization is formally named "compression standard based on digital storage media moving pictures and speech". The MPEG-2 standard has a higher image quality, more image formats, and a higher transmission code rate than the MPEG-1 standard. The MPEG-2 standard is not a simple upgrade of MPEG-1, but rather is a more detailed specification and further improvement in terms of transmission and systems. The compression scheme is used for standard digital televisions and high-definition televisions under various applications, and the transmission rate is 3 Mbit/s-10 Mbit/s.
The embodiment of the application provides a real-time monitoring method for video transmission, which is used for acquiring first video data, coding the first video data by using a preset coding method, and converting the format of the video data obtained by coding according to a preset first format to obtain second video data; obtaining a plurality of first RTP data packets based on the second video data; encrypting the plurality of first RTP data packets by using a preset encryption algorithm to obtain a plurality of second RTP data packets, adding access control information for each second RTP data packet, and adding a key of the preset encryption algorithm to the access control information; transmitting a plurality of second RTP data packets and access control information corresponding to each second RTP data packet to a receiving end, wherein the access control information is used for verifying the access authority of the receiving end; the control receiving end receives the second RTP data packets and access control information corresponding to the second RTP data packets, performs access right verification on the access control information, and decrypts the second RTP data packets by using a preset decryption algorithm under the condition that the access right verification is passed to obtain third RTP data packets; and controlling the receiving end, decoding the plurality of third RTP data packets by using a preset decoding method to obtain first video data, and displaying the first video data on display equipment of the receiving end. In the application scenarios of agricultural production, financial industry, urban public transportation, etc., for example, financial enterprises need to enhance the monitoring management of the individual ATM and the distributed application sites. By the real-time monitoring method of video transmission, application sites scattered in each financial industry and independent ATM (automatic teller machines) and a monitoring system can be connected with each other, so that video transmission of each site can be monitored in real time. The method for realizing the real-time monitoring of the video transmission is provided, and the operation of encrypting and decrypting the data and the access control information are added on the basis of realizing the transmission and the real-time monitoring of the video data, so that the safety of the video data in the process of data transmission can be enhanced.
The technical scheme provided by the embodiment of the application is further described below with reference to the accompanying drawings.
Referring to fig. 1, fig. 1 is a real-time monitoring method for video transmission according to an embodiment of the present application. The real-time monitoring method for video transmission comprises the steps of S1, S2, S3, S4, S5 and S6.
Step S1, obtaining first video data, encoding the first video data by using a preset encoding method, and performing format conversion on the encoded video data according to a preset first format to obtain second video data.
In an embodiment, the first video data is obtained from a preset video acquisition end, where the preset video acquisition end may include video data acquired in real time by a monitoring device such as a camera, or may include a file downloaded from a network or software, and here, the video data acquired in real time by the monitoring device such as the camera is described as an example. After the first video data is obtained, the first video data needs to be preprocessed, so that the coding efficiency of the video data can be improved, specifically, de-interlacing, image resampling, frame rate conversion, de-noise and the like are included, and after preprocessing is completed, third video data is obtained. Since the third video data belongs to the original video format, that is, YUV format, RGB format, etc., the video size is larger, the efficiency of transmission over the network is lower, and the third video data needs to be encoded to facilitate transmission over the network, that is, the third video data is substantially encoded and compressed. And performing encoding compression on the third video data by using a preset encoding method, namely an MPEG-2 encoding method to obtain encoded compressed third video data, and performing format conversion on the encoded third video data according to a preset first format, namely an MPEG format corresponding to the MPEG-2 encoding method to obtain second video data, wherein the preset encoding method comprises MPEG-1, MPEG-2 and the like, and the MPEG-2 is taken as an example for illustration. The obtained second video data is used as a basis of data transmission, and a precondition is provided for subsequent data transmission.
Step S2, based on the second video data, a plurality of first RTP data packets are obtained.
In an embodiment, the second video data is partitioned according to a preset partitioning method, that is, a key frame partitioning method, to obtain a plurality of video data blocks, and the plurality of video data blocks are used as payload data. In the RTP protocol, an RTP packet is composed of two parts, one part is an RTP header for marking related information of the RTP packet, and the other part is payload data of RTP for encapsulating actual data, such as a plurality of divided video data blocks. Since there are multiple video data blocks, there are multiple payload data, and a corresponding RTP header needs to be created for each payload data, but the format of the RTP header is the same, we can quickly create multiple RTP headers, such as a sequence number, a timestamp, etc., by adjusting some fields of each RTP only on a unified RTP format. An RTP header is created for each payload data, specifically: the creation of a corresponding RTP header for each payload data may be accomplished by setting the content of each portion of the RTP header corresponding to each video data block according to the RTP format, version, padding, flags, sequence numbers, time stamps, etc. After the creation of the plurality of RTP heads is completed, the plurality of payload data and the corresponding plurality of RTP heads are combined according to the format of the RTP data packets to obtain a plurality of first RTP data packets, and the obtained plurality of first RTP data packets are smaller in size, so that the network transmission can be facilitated.
And S3, encrypting the plurality of first RTP data packets by using a preset encryption algorithm to obtain a plurality of second RTP data packets, adding access control information for each second RTP data packet, adding a key of the preset encryption algorithm to the access control information, and sending the plurality of second RTP data packets and the access control information corresponding to each second RTP data packet to a receiving end, wherein the access control information is used for verifying the access authority of the receiving end.
In one embodiment, a predetermined encryption algorithm, that is, an AES encryption algorithm, is used, and the encryption algorithm includes AES, DES, and the like, which is described herein as an AES encryption algorithm. Determining an AES key according to an AES encryption algorithm, selecting an encryption mode and a filling scheme, and encrypting the plurality of first RTP data packets by using the AES encryption algorithm and the AES key to obtain a plurality of second RTP data packets. And then adding access control information for each second RTP data packet, adding an AES key into the access control information corresponding to each second RTP data packet, and sending the second RTP data packets and the access control information corresponding to each second RTP data packet to a receiving end. The encrypted data has higher security, and the access control information is added on the basis of data encryption, so that the security of the data can be further improved.
In an embodiment, the access control information is used to verify the access right of the receiving end, as shown in fig. 2, the preset encryption algorithm is used to encrypt the plurality of first RTP data packets to obtain a plurality of second RTP data packets, access control information is added to each second RTP data packet, a key of the preset encryption algorithm is added to the access control information, and the plurality of second RTP data packets and the access control information corresponding to each second RTP data packet are sent to the receiving end, including but not limited to the following steps:
step S31, determining a key of the encryption algorithm according to a preset encryption algorithm.
In one possible embodiment of the present application, according to the preset encryption algorithm in step S3, that is, the AES encryption algorithm, the key of the encryption algorithm is determined to be the AES key and the encryption library of the AES encryption algorithm is imported. And selecting a proper key length for the AES key, wherein the AES encryption and decryption algorithm supports three key lengths of 128 bits, 192 bits and 256 bits, so that the proper key length can be selected according to actual security requirements. An AES key is randomly generated using a random number generator according to the selected AES key length, and the resulting AES key may be used to create and initialize the encryptor object.
Step S32, an encryptor object is created according to a preset encryption algorithm and a preset secret key, and the encryptor object is initialized to obtain an initial encryptor object.
In a possible embodiment of the present application, according to the AES encryption algorithm, the encryption mode and the padding mode of the AES encryption algorithm are determined to be CBC and PKCS5 padding, the encryption mode of the AES encryption algorithm includes ECB, CBC, and the like, and the padding mode includes PKCS7 padding, PKCS5 padding, and the like, and the CBC and PKCS5 padding are described herein as an example. And filling and creating an encryptor object by using an AES encryption algorithm, CBC and PKCS5, and initializing the encryptor object by using the CBC, the AES key generated in the step S31 and an initialization vector (IV, initialization Vector) after the encryptor object is created, so as to obtain an initial encryptor object, wherein the initialization vector is a random input value with fixed length, and the length is the same as the length of the AES key. The obtained initial encryptor object can be used for encrypting the plurality of first RTP data packets, so that subsequent encryption of the plurality of first RTP data packets is facilitated.
In step S33, each first RTP packet is encrypted by using the initial encryptor object, so as to obtain a plurality of second RTP packets.
In one possible embodiment of the present application, each of the first RTP packets is encrypted by using an initial encryptor object to obtain a plurality of second RTP packets, specifically: each first RTP packet is input as a parameter to the initial encryptor object obtained in step S32, and the encryptor () method of the initial encryptor object is called for encryption. After encryption is completed, a plurality of second RTP data packets are obtained, and the obtained second RTP data packets are encrypted RTP data packets, so that the security is higher, and the security of data transmission can be ensured.
And step S34, adding access control information for each second RTP data packet, adding a key into the access control information, and sending the second RTP data packets and the access control information corresponding to each second RTP data packet to a receiving end.
In one possible embodiment of the present application, access control information is first added to each second RTP packet, and since the effect of the access control information is to ensure that the second RTP packet and the AES key are only accessed by the receiving end and not by other illegal third parties, each access control information needs to be configured, but each access control information is used to verify the access authority of the receiving end, so that each access control information can be configured identically. And then configuring each piece of access control information, setting permission allowing access as permission for accessing and operating the access control information by using an allowances instruction, adding an AES key into the access control information corresponding to each second RTP data packet, and sending a plurality of second RTP data packets and the access control information corresponding to each second RTP data packet to a receiving end.
And S4, the control receiving end receives the second RTP data packets and access control information corresponding to the second RTP data packets, generates RTCP feedback information, sends the RTCP feedback information to the sending end, receives the RTCP feedback information, and adjusts the sending rate of the RTP data packets or adjusts the coding method.
In an embodiment, the control receiving end receives the plurality of second RTP data packets and the access control information corresponding to each second RTP data packet sent by the sending end, collects the statistical information of the plurality of second RTP data packets, generates RTCP feedback information, and sends the RTCP feedback information to the sending end. And receiving RTCP feedback information, analyzing the statistical information in the RTCP feedback information to obtain an analysis result, and judging the current network state according to the analysis result. Under the condition of poor network state, reducing the sending rate of RTP data packets or simplifying the coding method; under the condition of better network state, the sending rate of RTP data packets is increased or the coding method is complicated.
As shown in fig. 3, the control receiving end receives the plurality of second RTP data packets and the access control information corresponding to each second RTP data packet, generates RTCP feedback information, sends the RTCP feedback information to the transmitting end, receives the RTCP feedback information, and adjusts the sending rate of the RTP data packets or adjusts the encoding method, which includes but is not limited to the following steps:
In step S41, the control receiving end receives the plurality of second RTP data packets and access control information corresponding to each second RTP data packet, generates RTCP feedback information, and sends the RTCP feedback information to the sending end.
In one possible embodiment of the present application, the control receiving end receives a plurality of second RTP data packets sent by the sending end and access control information corresponding to each second RTP data packet, and collects statistical information of the plurality of second RTP data packets. In the RTCP protocol, an RTCP packet is composed of an RTCP header and RTCP information, collected statistics information is used as RTCP information, the content of each part of the RTCP header, such as version, filling, length, etc., is set, and the RTCP header and the RTCP information are combined in sequence to obtain RTCP feedback information. And then sending RTCP feedback information to the sending end, wherein the generated RTCP feedback information comprises the condition that the receiving end receives the second RTP data packet and can be used for judging the current network state.
Step S42, receiving RTCP feedback information, analyzing the statistical information in the RTCP feedback information to obtain an analysis result, wherein the statistical information is obtained by controlling the receiving end to count a plurality of second RTP data packets.
In one possible embodiment of the present application, the RTCP feedback information sent by the receiving end is received, and the RTCP feedback information is analyzed to obtain an analysis result. The method is to analyze the statistical information in the RTCP feedback information to obtain an analysis result, specifically: and analyzing the statistical information in the RTCP feedback information, and calculating loop delay, packet loss rate, jitter and the like, wherein the statistical information is information such as the number of second RTP data packets received by the receiving end, the number of lost second RTP data packets, the time of initially receiving the second RTP data packets, the time of receiving each second RTP data packet and the like, which are obtained by controlling the receiving end to count the plurality of second RTP data packets. The obtained analysis result can directly judge the current network state, and is convenient for adjusting the sending rate of RTP data packets or adjusting the coding method according to the network state.
Step S43, judging the current network state according to the analysis result.
In one possible embodiment of the present application, the current network state may be determined according to the analysis result obtained in step S42. The method comprises the following steps: judging the current network state according to the loop delay, the packet loss rate and the like calculated in the analysis result; under the conditions of longer loop delay and higher packet loss rate, the current network state is worse; under the conditions of shorter loop delay and lower packet loss rate, the current network state is better. And judging the current network state according to the analysis result to adjust the sending rate of the RTP data packet or adjust the coding method, so that the quality of data transmission can be controlled in real time.
Step S44, in case of poor network state, the transmission rate of RTP data packets is reduced or the encoding method is simplified.
In one possible embodiment of the present application, the sending rate of RTP packets may be reduced or the encoding method simplified in case of poor current network conditions. Reducing the transmission rate of RTP packets to reduce the probability of network congestion and the proportion of lost packets can be achieved by increasing the time interval between transmitting RTP packets or reducing the number of RTP packets transmitted by the transmitting end each time. Simplifying the coding method to reduce the size and complexity of RTP packets to accommodate poor network conditions can be achieved by reducing the use of higher level coding modes or using lower compression coding ratios. Under the condition of poor current network state, the transmission rate of RTP data packets is reduced or the coding method is simplified, so that the network load can be reduced, and the stability of data transmission is improved.
In step S45, under the condition of better network state, the sending rate of the RTP packet is increased or the encoding method is complicated.
In one possible embodiment of the present application, the sending rate of RTP packets may be increased or the encoding method may be complicated in case the current network state is better. Increasing the transmission rate of RTP packets to increase the efficiency of packet transmission can be achieved by shortening the time interval between transmitting RTP packets or increasing the number of RTP packets transmitted by the transmitting end each time. Complicating the coding method to improve video quality and compression coding efficiency can be achieved by using higher level coding modes or using higher compression coding ratios. Under the condition of better current network state, the transmission rate of RTP data packets is increased or the coding method is complicated, so that the transmission efficiency and video quality of the data packets can be improved.
And S5, controlling the receiving end to carry out access right verification on the access control information, and decrypting the plurality of second RTP data packets by using a preset decryption algorithm under the condition that the access right verification is passed to obtain a plurality of third RTP data packets.
In an embodiment, the control receiving end performs authority verification on the access control information corresponding to each second RTP packet received in step S4, and reads the AES key from the access control information when the access authority verification passes. And then decrypting the plurality of second RTP data packets by using the AES key and a preset decryption algorithm, namely, an AES decryption algorithm corresponding to the AES encryption algorithm to obtain a plurality of third RTP data packets, wherein the obtained plurality of third RTP data packets can be used for subsequent data decoding, and the decryption algorithm and the key are used for decrypting the encrypted data packets, so that the RTP data packets for decoding can be ensured to be higher in safety.
As shown in fig. 4, the control receiving end performs access right verification on the access control information, and decrypts the plurality of second RTP data packets by using a preset decryption algorithm to obtain a plurality of third RTP data packets under the condition that the access right verification is passed, including but not limited to the following steps:
Step S51, the control receiving end performs access right verification on the access control information, and when the access right verification passes, the key is read from the access control information.
In a possible embodiment of the present application, the control receiving end performs authority verification on the access control information corresponding to each second RTP packet, which needs to verify each access control information one by one, but in step S34, the configuration of each access control information is the same, and only any access control information is required to perform authority verification on behalf of each access control information. The access authority of the access control information is verified, specifically: the permission of access permission set in step S34 is permission of access and operation to the access control information, and the access permission verification to the access control information is to verify whether the access permission of the receiving end has permission of access permission. And under the condition that the access authority verification is passed, reading an AES key from the access control information by using an open function, wherein the obtained AES key can be decrypted by applying subsequent data.
Step S52, a decryptor object is created according to a preset decryption algorithm and a preset secret key, and the decryptor object is initialized to obtain an initial decryptor object.
In one possible embodiment of the present application, an AES decryption algorithm corresponding to the AES encryption algorithm is used to create a decryptor object, and after the decryptor object is created, the AES decryption algorithm, the AES key and the initialization vector are used to initialize the encryptor object to obtain an initial decryptor object, where the initialization vector used in this step may use the initialization vector used in step S32, or may regenerate a new initialization vector. The obtained initialized decryptor object can be used for decrypting a plurality of second RTP data packets, and subsequent data decryption is facilitated.
In step S53, each second RTP packet is decrypted by using the initial decryptor object to obtain a plurality of third RTP packets.
In one possible embodiment of the present application, each of the second RTP packets is decrypted by using the initial decryptor object to obtain a plurality of third RTP packets, specifically: each second RTP packet is input as a parameter to the initial decryptor object obtained in step S52, and the decryptor () method of the initial decryptor object is called for decryption. After decryption is completed, a plurality of third RTP data packets are obtained, and the obtained third RTP data packets are decrypted RTP data packets and can be used for subsequent data decoding.
And S6, controlling the receiving end, decoding the plurality of third RTP data packets by using a preset decoding method to obtain first video data, and displaying the first video data on display equipment of the receiving end.
In an embodiment, since the plurality of third RTP packets obtained in step S5 are encoded and compressed video data, the third RTP packets cannot be directly displayed on the display device of the receiving end, and the third RTP packets need to be decoded before being displayed on the display device of the receiving end. And (3) controlling the receiving end to decode the plurality of third RTP data packets by using a preset decoding method, namely an MPEG-2 decoding method corresponding to the MPEG-2 encoding method used in the step (S1), so as to obtain a plurality of decoded third RTP data packets, and then combining the plurality of decoded third RTP data packets according to the sequence of the sequence numbers recorded by the RTP heads in each third RTP data packet, so as to obtain combined video data. And then converting the format of the combined video data according to the format of the first video data, namely YUV format, RGB format and the like to obtain the first video data, wherein the receiving end is connected with one or more display devices, so that the first video data can be directly sent to the display devices of the receiving end and displayed on the display devices of the receiving end, the receiving end is controlled, a plurality of third RTP data packets are decoded by utilizing a preset decoding method to obtain the first video data, and the first video data is displayed on the display devices of the receiving end.
In one embodiment, at the control receiving end, a preset decoding method is used to decode the plurality of third RTP data packets to obtain first video data, and after the first video data is displayed on the display device of the receiving end, as shown in fig. 5, the real-time monitoring method for video transmission further includes, but is not limited to, the following steps:
step S101, a control instruction sent by display equipment of a receiving end is controlled, the control instruction is obtained by triggering click operation of the display equipment by a user through the display equipment, and the control instruction is sent to a sending end.
In a possible embodiment of the present application, under the RTSP protocol, the display device and the transmitting end of the receiving end may use PLAY control instructions, PAUSE control instructions, REDIRECT control instructions, etc. and since the display device is connected to the receiving end, the control instructions generated by the display device may be directly sent to the transmitting end. Then a click operation processing program is deployed on the display equipment of the receiving end, the click operation of the user on the display equipment of the receiving end is triggered, the click operation processing program is controlled to generate a control instruction, and the control instruction is generated according to the click operation of the user, wherein the instructions such as a PLAY instruction, a PAUSE instruction, a REDIRECT instruction, a RECORD instruction and the like are generated. The control receiving end sends the control instruction to the sending end, and the generated control instruction can reflect the requirement of a user on the video playing state.
Step S102, receiving a control instruction, adjusting the playing state of the first video data according to the control parameter in the control instruction, and sending the adjusted first video data to a receiving end and displaying the first video data on a display device.
In one possible embodiment of the present application, a control instruction sent by a display device at a receiving end is received, and control parameters in the control instruction are analyzed to adjust a playing state of the first video data. The received PLAY command, PAUSE command, REDIRECT command, RECORD command, etc. respectively represent the meanings of video playing, video pausing, video fast forwarding/rewinding, video recording, etc., and the respective control parameters include a frame for starting playing, a frame for pausing playing, a start frame and an end frame for fast forwarding/rewinding, a start frame and an end frame for recording, etc. And then, according to different control instructions and control parameters of the control instructions, adjusting the playing state of the first video data, sending the adjusted first video data to the receiving end, displaying the first video data on display equipment of the receiving end, and adjusting the playing state of the video according to clicking operation of a user.
As shown in fig. 6, an embodiment of the present application provides a real-time monitoring system for video transmission, where the system firstly invokes a data acquisition module 110 to acquire first video data, where the data acquisition module 110 includes a data encoding module 111 and a format conversion module 112, then invokes the data encoding module 111 to encode the first video data by using a preset encoding method, where the data encoding module 111 is connected with the format conversion module 112, invokes the format conversion module 112 to convert the format of the encoded video data according to a preset first format, and obtain second video data; the data acquisition module 110 is connected with the data packetizing module 120, and calls the data packetizing module 120 to obtain a plurality of first RTP data packets based on the second video data; the data packetizing module 120 and the data encrypting module 130 are connected, the data encrypting module 130 is called to encrypt the plurality of first RTP data packets by using a preset encryption algorithm to obtain a plurality of second RTP data packets, access control information is added for each second RTP data, and a key of the preset encryption algorithm is added to the access control information; the data encryption module 130 is connected with the data transmission module 140, and calls the data transmission module 140 to send a plurality of second RTP data packets and access control information corresponding to each second RTP data packet to the receiving end, wherein the access control information is used for verifying the access authority of the receiving end; the data transmission module 140 is connected with the data decryption module 150, the data decryption module 150 is called to control the receiving end to receive the plurality of second RTP data packets and access control information corresponding to each second RTP data packet, the data decryption module 150 comprises an authority verification module 151, then the authority verification module 151 is called to carry out access authority verification on the access control information, and under the condition that the access authority verification passes, the plurality of second RTP data packets are decrypted by utilizing a preset decryption algorithm to obtain a plurality of third RTP data packets; the data decryption module 150 is connected to the data decoding module 160, and calls the data decoding module 160 to control the receiving end, decodes the plurality of third RTP data packets by using a preset decoding method to obtain first video data, and displays the first video data on a display device of the receiving end. The video transmission real-time monitoring method is applied to the video transmission real-time monitoring system.
It should be noted that: in the device provided in the above embodiment, when implementing the functions thereof, only the division of the above functional modules is used as an example, in practical application, the above functional allocation may be implemented by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to implement all or part of the functions described above. In addition, the embodiments of the apparatus and the method provided in the foregoing embodiments belong to the same concept, and specific implementation processes of the embodiments of the method are detailed in the method embodiments, which are not repeated herein.
The application also discloses electronic equipment. Referring to fig. 7, fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device 700 may include: at least one processor 701, at least one network interface 704, a user interface 703, a memory 705, at least one communication bus 702.
Wherein the communication bus 702 is used to enable connected communications between these components.
The user interface 703 may include a Display screen interface (Display), a Camera interface (Camera), and the optional user interface 703 may further include a standard wired interface, a wireless interface.
The network interface 704 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Wherein the processor 701 may include one or more processing cores. The processor 701 connects various portions of the overall server using various interfaces and lines, performs various functions of the server and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 705, and invoking data stored in the memory 705. Alternatively, the processor 701 may be implemented in at least one hardware form of digital signal Processing (DIGITAL SIGNAL Processing, DSP), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 701 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 701 and may be implemented by a single chip.
The Memory 705 may include a random access Memory (Random Access Memory, RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 705 includes a non-transitory computer readable medium (non-transitory computer-readable storage medium). Memory 705 may be used to store instructions, programs, code, sets of codes, or instruction sets. The memory 705 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described above, etc.; the storage data area may store data or the like involved in the above respective method embodiments. The memory 705 may also optionally be at least one storage device located remotely from the processor 701. Referring to fig. 7, an operating system, a network communication module, a user interface module, and an application program of a real-time monitoring method of video transmission may be included in a memory 705 as a computer storage medium.
In the electronic device 700 shown in fig. 7, the user interface 703 is mainly used for providing an input interface for a user, and acquiring data input by the user; and the processor 701 may be configured to invoke an application of a method for real-time monitoring of video transmissions stored in the memory 705, which when executed by the one or more processors 701, causes the electronic device 700 to perform the method as in one or more of the embodiments described above. It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present application is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all of the preferred embodiments, and that the acts and modules referred to are not necessarily required for the present application.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
In the several embodiments provided by the present application, it should be understood that the disclosed system may be implemented in other ways. For example, the system embodiments described above are merely illustrative, such as a division of modules, merely a division of logic functions, and there may be additional divisions of actual implementation, such as multiple modules may be combined or integrated into another system, or some features may be omitted, or not implemented. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some service interface, device or unit indirect coupling or communication connection, electrical or otherwise.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable memory. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in whole or in part in the form of a software product stored in a memory, comprising several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method of the various embodiments of the present application. And the aforementioned memory includes: various media capable of storing program codes, such as a U disk, a mobile hard disk, a magnetic disk or an optical disk.
This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a scope and spirit of the disclosure being indicated by the claims.

Claims (9)

1. A method for monitoring video transmission in real time, which is applied to a transmitting end, the method comprising:
acquiring first video data, encoding the first video data by using a preset encoding method, and performing format conversion on the video data obtained by encoding according to a preset first format to obtain second video data;
obtaining a plurality of first RTP data packets based on the second video data;
Encrypting a plurality of first RTP data packets by using a preset encryption algorithm to obtain a plurality of second RTP data packets, adding access control information for each second RTP data packet, and adding a key of the preset encryption algorithm into the access control information;
Transmitting a plurality of second RTP data packets and the access control information corresponding to each second RTP data packet to a receiving end, wherein the access control information is used for verifying the access authority of the receiving end;
Controlling the receiving end to receive a plurality of second RTP data packets and the access control information corresponding to each second RTP data packet, performing access right verification on the access control information, and decrypting the plurality of second RTP data packets by using a preset decryption algorithm under the condition that the access right verification is passed to obtain a plurality of third RTP data packets;
The receiving end is controlled, a plurality of third RTP data packets are decoded by using a preset decoding method to obtain the first video data, and the first video data are displayed on display equipment of the receiving end;
The method for obtaining the first video data, using a preset encoding method to encode the first video data, performing format conversion on the encoded video data according to a preset first format to obtain second video data, includes:
acquiring first video data, and preprocessing the first video data to obtain third video data;
and encoding the third video data by using a preset encoding method, and converting the format of the encoded video data according to a preset first format to obtain second video data, wherein the preset encoding method is MPEG-2 encoding, and the first format is an MPEG format corresponding to the MPEG-2 encoding.
2. The method according to claim 1, wherein said obtaining a plurality of first RTP packets based on said second video data comprises:
dividing the second video data into a plurality of data blocks according to a preset dividing method, and taking the plurality of data blocks as effective load data;
And creating RTP header parts for each payload data, and combining the RTP header parts corresponding to the payload data with the payload data to obtain a plurality of first RTP data packets.
3. The method according to claim 1, wherein encrypting the plurality of first RTP packets using a preset encryption algorithm to obtain a plurality of second RTP packets, and adding access control information to each of the second RTP packets, and adding a key of the preset encryption algorithm to the access control information, comprises:
Determining a key of an encryption algorithm according to a preset encryption algorithm;
Creating an encryptor object according to the preset encryption algorithm and the secret key, and initializing the encryptor object to obtain an initial encryptor object;
Encrypting each first RTP data packet by using the initial encryptor object to obtain a plurality of second RTP data packets;
And adding access control information to each second RTP data packet, and adding the key to the access control information.
4. The method according to claim 1, wherein after said controlling said receiving end to receive a plurality of said second RTP packets and said access control information corresponding to each of said second RTP packets, said method further comprises:
Controlling the receiving end to generate RTCP feedback information and sending the RTCP feedback information to the sending end;
Receiving the RTCP feedback information, and analyzing statistical information in the RTCP feedback information to obtain an analysis result, wherein the statistical information is obtained by controlling the receiving end to count a plurality of second RTP data packets;
Judging the current network state according to the analysis result;
under the condition of poor network state, reducing the sending rate of RTP data packets or simplifying the coding method;
under the condition of better network state, the sending rate of RTP data packets is increased or the coding method is complicated.
5. The method according to claim 1, wherein the controlling the receiving end to receive the plurality of second RTP packets and the access control information corresponding to each of the second RTP packets, perform access right verification on the access control information, and decrypt the plurality of second RTP packets by using a preset decryption algorithm if the access right verification passes, to obtain a plurality of third RTP packets, includes:
Controlling the receiving end to receive a plurality of second RTP data packets and the access control information corresponding to each second RTP data packet, and verifying the access right of the access control information;
reading the key from the access control information under the condition that the access authority verification is passed;
creating a decryptor object according to the preset decryption algorithm and the secret key, and initializing the decryptor object to obtain an initial decryptor object;
And decrypting each second RTP data packet by using the initial decryptor object to obtain a plurality of third RTP data packets.
6. The method according to claim 1, wherein after said controlling said receiving end decodes a plurality of said third RTP packets using a preset decoding method to obtain said first video data and displays said first video data on a display device of said receiving end, said method further comprises:
The control instruction is triggered by the display equipment of the receiving end to be obtained by clicking operation of a user on the display equipment, and the control instruction is sent to the sending end;
And receiving the control instruction, adjusting the playing state of the first video data according to the control parameter in the control instruction, sending the adjusted first video data to the receiving end, and displaying the first video data on the display equipment.
7. A real-time monitoring system for video transmission, applied to a transmitting end, the system comprising:
the data acquisition module (110) is used for acquiring first video data, encoding the first video data by using a preset encoding method, and converting the format of the encoded video data according to a preset first format to obtain second video data;
A data packetization module (120) for obtaining a plurality of first RTP packets based on the second video data;
A data encryption module (130) configured to encrypt a plurality of first RTP packets by using a preset encryption algorithm to obtain a plurality of second RTP packets, and add access control information to each of the second RTP packets, and add a key of the preset encryption algorithm to the access control information;
The data transmission module (140) is used for sending a plurality of second RTP data packets and the access control information corresponding to each second RTP data packet to a receiving end, wherein the access control information is used for verifying the access authority of the receiving end;
The data decryption module (150) is configured to control the receiving end to receive a plurality of second RTP data packets and the access control information corresponding to each second RTP data packet, perform access right verification on the access control information, and decrypt the plurality of second RTP data packets by using a preset decryption algorithm to obtain a plurality of third RTP data packets if the access right verification is passed;
The data decoding module (160) is used for controlling the receiving end, decoding a plurality of third RTP data packets by using a preset decoding method to obtain the first video data, and displaying the first video data on display equipment of the receiving end;
The data acquisition module (110) is specifically configured to acquire first video data, and perform preprocessing on the first video data to obtain third video data; and encoding the third video data by using a preset encoding method, and converting the format of the encoded video data according to a preset first format to obtain second video data, wherein the preset encoding method is MPEG-2 encoding, and the first format is an MPEG format corresponding to the MPEG-2 encoding.
8. An electronic device, characterized in that the electronic device (700) comprises a processor (701), a memory (705), a user interface (703) and a network interface (704), the memory (705) being adapted to store instructions, the user interface (703) and the network interface (704) being adapted to communicate to other devices, the processor (701) being adapted to execute the instructions stored in the memory (705) to cause the electronic device (700) to perform the method according to any of claims 1-6.
9. A computer readable storage medium storing instructions which, when executed, perform the method of any one of claims 1-6.
CN202311313197.XA 2023-10-11 2023-10-11 Video transmission real-time monitoring method and system and electronic equipment Active CN117395466B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311313197.XA CN117395466B (en) 2023-10-11 2023-10-11 Video transmission real-time monitoring method and system and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311313197.XA CN117395466B (en) 2023-10-11 2023-10-11 Video transmission real-time monitoring method and system and electronic equipment

Publications (2)

Publication Number Publication Date
CN117395466A CN117395466A (en) 2024-01-12
CN117395466B true CN117395466B (en) 2024-04-30

Family

ID=89440314

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311313197.XA Active CN117395466B (en) 2023-10-11 2023-10-11 Video transmission real-time monitoring method and system and electronic equipment

Country Status (1)

Country Link
CN (1) CN117395466B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004064652A (en) * 2002-07-31 2004-02-26 Sharp Corp Communication equipment
CN103051978A (en) * 2012-12-16 2013-04-17 华南理工大学 H264-based real-time mobile video service control method
CN104333763A (en) * 2014-11-24 2015-02-04 成都瑞博慧窗信息技术有限公司 Video control method
CN106470345A (en) * 2015-08-21 2017-03-01 阿里巴巴集团控股有限公司 Video-encryption transmission method and decryption method, apparatus and system
CN109639419A (en) * 2018-12-29 2019-04-16 北京深思数盾科技股份有限公司 Cryptographic key protection method, cipher key storage device and terminal device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004064652A (en) * 2002-07-31 2004-02-26 Sharp Corp Communication equipment
CN103051978A (en) * 2012-12-16 2013-04-17 华南理工大学 H264-based real-time mobile video service control method
CN104333763A (en) * 2014-11-24 2015-02-04 成都瑞博慧窗信息技术有限公司 Video control method
CN106470345A (en) * 2015-08-21 2017-03-01 阿里巴巴集团控股有限公司 Video-encryption transmission method and decryption method, apparatus and system
CN109639419A (en) * 2018-12-29 2019-04-16 北京深思数盾科技股份有限公司 Cryptographic key protection method, cipher key storage device and terminal device

Also Published As

Publication number Publication date
CN117395466A (en) 2024-01-12

Similar Documents

Publication Publication Date Title
JP7284906B2 (en) Delivery and playback of media content
US10263875B2 (en) Real-time processing capability based quality adaptation
US9049479B2 (en) Set-top box-based TV streaming and redirecting
US6989773B2 (en) Media data encoding device
US9596522B2 (en) Fragmented file structure for live media stream delivery
US8832434B2 (en) Methods for generating data for describing scalable media
US9462302B2 (en) Efficient delineation and distribution of media segments
CN112822518A (en) Video playing method, device, system, electronic equipment and storage medium
US7249264B2 (en) Secure IP based streaming in a format independent manner
US7797454B2 (en) Media data transcoding devices
US20050204109A1 (en) Methods for scaling encoded data without requiring knowledge of the encoding scheme
JP3925218B2 (en) Streaming system and streaming method, streaming server and data distribution method, client terminal and data decoding method, program and recording medium
CN112752115B (en) Live broadcast data transmission method, device, equipment and medium
EP1933529A1 (en) Content distribution system by SIP(Session Initiation Protocol), content server side user terminal, content client side user terminal and authentication method
CN102365871A (en) Distribution system and method, conversion device, and program
CN105007465A (en) Cipher-text H264 video live-broadcasting and on-demand platform based on live555 frame and ffmpeg library
US7580520B2 (en) Methods for scaling a progressively encrypted sequence of scalable data
CN117395466B (en) Video transmission real-time monitoring method and system and electronic equipment
CN102598690A (en) Encryption procedure and device for an audiovisual data stream
EP4256791A1 (en) Systems and methods of alternative networked application services
CN116405711B (en) System for encrypting and decrypting real-time audio and video stream and audio and video stream encryption method
US20220201372A1 (en) Live video streaming architecture with real-time frame and subframe level live watermarking
CN118120238A (en) Video playing method, system and storage medium
WO2009117924A1 (en) Method and device for processing transcoding of streaming media
KR20100001045A (en) System for preventing illegal utilization of broadcasting contents in iptv broadcasting service and method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant