CN113037532A - Stream media code stream detection method, device, server and readable storage medium - Google Patents

Stream media code stream detection method, device, server and readable storage medium Download PDF

Info

Publication number
CN113037532A
CN113037532A CN201911359458.5A CN201911359458A CN113037532A CN 113037532 A CN113037532 A CN 113037532A CN 201911359458 A CN201911359458 A CN 201911359458A CN 113037532 A CN113037532 A CN 113037532A
Authority
CN
China
Prior art keywords
code stream
media code
streaming media
stream
function
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.)
Pending
Application number
CN201911359458.5A
Other languages
Chinese (zh)
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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201911359458.5A priority Critical patent/CN113037532A/en
Publication of CN113037532A publication Critical patent/CN113037532A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/142Network analysis or design using statistical or mathematical methods
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/65Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Algebra (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Pure & Applied Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention provides a method, a device, a server and a readable storage medium for detecting stream media code streams, wherein in the process of stream media data transmission, a specific function is hijacked on a stream media server node and is set as a new filter function, and the stream media code streams needing to be tracked, detected and analyzed are filtered out in the filter function according to preset stream media code stream configuration information to be detected so as to be further analyzed; and when the stream media code stream does not accord with the configuration information of the target stream media code stream to be detected or the stream media code stream which accords with the conditions is analyzed, calling the original function to carry out normal processing. The stream media code stream meeting the conditions is directly acquired from the stream media server node, so that the real-time performance of stream media code stream detection is ensured, a large amount of investment caused by bypass on a data link is avoided, and in some implementation processes, the technical effects including but not limited to improving the real-time performance of stream media code stream detection and reducing the detection cost of the stream media code stream can be realized.

Description

Stream media code stream detection method, device, server and readable storage medium
Technical Field
The embodiment of the invention relates to the field of internet streaming media, in particular to but not limited to a streaming media code stream detection method, a device, a server and a readable storage medium.
Background
With The development of The CDN (Content Delivery Network, The same below) multimedia technology, in order to analyze a streaming media stream, a streaming media stream detection technology is also widely applied in The internet, for example, The technology is applied in IPTV (interactive Network television) and OTT (Over The Top, which refers to providing various application services to users through The internet) for detecting The streaming media stream and QoS (Quality of Service, The same below) analysis.
In the related technology, the method for detecting the streaming media code stream comprises the steps of firstly, on-line packet capturing through a packet capturing tool and then analyzing the code stream through the tool; secondly, by using special equipment, a bypass is made on the switch or the equipment to detect the code stream. In the first mode, the analysis is performed by a tool after the on-line packet capturing is needed, the real-time performance is poor, and the performance of the packet capturing tool can also influence the analysis result of the code stream. The second mode needs special equipment, bypasses are made on a data link, a network needs to be modified, and the investment is large. Aiming at the problems in the related art, a stream media code stream detection method with high real-time performance and good applicability does not exist at present.
Disclosure of Invention
The embodiment of the invention provides a method, a device, a server and a readable storage medium for detecting stream media code streams, and mainly solves the technical problems that: in the related technology, for the detection of the stream media code stream, the on-line packet capturing is needed and then the analysis is carried out through a tool, so that the real-time performance is not good, and the performance of the packet capturing tool can also influence the analysis result of the code stream; or special equipment is needed, and a bypass is made on a data link to transform the network, so that the investment is large.
In order to solve the above technical problem, an embodiment of the present invention provides a method for detecting a streaming media code stream, including:
hijacking a specific function of the streaming media transmission equipment in the process of transmitting the streaming media code stream, and resetting the function as a filtering function;
and in the filtering function, filtering the streaming media code stream needing to be analyzed according to the configuration information of the target streaming media code stream.
In an embodiment of the present invention, when the hijacked specific function is a data transmission function, filtering the streaming media code stream that needs to be analyzed according to the configuration information of the target streaming media code stream includes:
judging whether the streaming media code stream accords with preset outgoing streaming media code stream information or not;
if yes, analyzing the stream media code stream; if not, calling a data sending function to send the streaming media code stream.
In an embodiment of the present invention, after the streaming media code stream is analyzed, a data sending function is called to send the streaming media code stream.
In an embodiment of the present invention, when the hijacked specific function is a data receiving function, filtering the streaming media code stream to be processed according to the configuration information of the target streaming media code stream includes:
judging whether the streaming media code stream conforms to preset incoming streaming media code stream information or not;
if yes, analyzing the stream media code stream; if not, calling a data receiving function to transfer the streaming media code stream to an upper layer protocol for processing.
In an embodiment of the present invention, after the streaming media code stream is analyzed, a data receiving function is called to transfer the streaming media code stream to an upper layer protocol for processing.
To solve the above technical problem, an embodiment of the present invention provides a stream media code stream detection device, including:
the detection module is used for hijacking a specific function in the streaming media code stream receiving and sending equipment and resetting the specific function as a filtering function;
the analysis module is used for filtering the streaming media code stream needing to be analyzed according to the configuration information of the target streaming media code stream in the filtering function;
a configuration module for configuring and storing the configuration information of the target streaming media code stream
In an embodiment of the present invention, when the specific function hijacked by the detection module is a data transmission function, the filtering, by the analysis module, the streaming media code stream that needs to be analyzed according to the configuration information of the target streaming media code stream includes:
judging whether the streaming media code stream accords with preset outgoing streaming media code stream information or not;
if yes, analyzing the stream media code stream; if not, calling a data sending function to send the streaming media code stream.
In an embodiment of the present invention, after the analyzing module analyzes the streaming media code stream, the analyzing module calls a data sending function to send the streaming media code stream.
In an embodiment of the present invention, when the specific function hijacked by the detection module is a data receiving function, the filtering, by the analysis module, the streaming media code stream that needs to be processed according to the configuration information of the target streaming media code stream includes:
judging whether the streaming media code stream conforms to preset incoming streaming media code stream information or not;
if yes, analyzing the stream media code stream; if not, calling a data receiving function to transfer the streaming media code stream to an upper layer protocol for processing.
In an embodiment of the present invention, after the analysis module completes analysis of the streaming media code stream, the analysis module calls a data receiving function to transfer the streaming media code stream to an upper layer protocol for processing.
The embodiment of the invention also provides a server, which comprises a processor, a memory and a communication bus;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is used for executing one or more computer programs stored in the memory to realize the steps in the streaming media code stream detection method.
The embodiment of the present invention further provides a computer-readable storage medium, where one or more computer programs are stored in the computer-readable storage medium, and the one or more computer programs can be executed by one or more processors to implement the steps in the streaming media code stream detection method.
The invention has the beneficial effects that:
according to the stream media code stream detection method, the device, the server and the readable storage medium provided by the embodiment of the invention, in the stream media data transmission process, a specific function is hijacked on a stream media transmission equipment node and is set as a new filter function, and the stream media code stream needing to be tracked, detected and analyzed is filtered in the filter function according to preset stream media code stream configuration information to be detected so as to be further analyzed; and when the stream media code stream does not accord with the configuration information of the target stream media code stream to be detected or the stream media code stream which accords with the conditions is analyzed, calling the original function to carry out normal processing. The stream media code stream meeting the conditions is directly acquired from the stream media server node, so that the real-time performance of stream media code stream detection is ensured, a large amount of investment caused by bypass on a data link is avoided, and in some implementation processes, the technical effects including but not limited to improving the real-time performance of stream media code stream detection and reducing the detection cost of the stream media code stream can be realized.
Additional features and corresponding advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
Fig. 1 is a flowchart of a method for detecting streaming media code streams according to a first embodiment of the present invention;
fig. 2 is a schematic diagram illustrating an analysis of outgoing code streams of a streaming media server according to a first embodiment of the present invention;
fig. 3 is a schematic diagram illustrating incoming stream analysis of a streaming media server according to a first embodiment of the present invention;
fig. 4 is a schematic structural diagram of a streaming media code stream detection device according to a second embodiment of the present invention;
fig. 5 is a schematic diagram illustrating a working process of the streaming media code stream detection apparatus in the outgoing code stream analysis of the streaming media server according to the second embodiment of the present invention;
fig. 6 is a schematic working diagram of a streaming media code stream detection apparatus in a second embodiment of the present invention in analyzing incoming code streams of a streaming media server;
fig. 7 is a schematic structural diagram of three servers according to the embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention are described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The first embodiment is as follows:
in order to solve the problems in the related art that the detection of the streaming media code stream needs to be performed on line and then analyzed by a tool, the real-time performance is poor, and the performance of the packet capturing tool influences the analysis result of the code stream; or a special device is needed, a bypass is made on a data link to transform a network, and the investment is large, the embodiment of the invention provides a stream media code stream detection method, as shown in fig. 1, which comprises the following steps:
s101: hijacking the specific function of the streaming media transmission equipment in the process of transmitting the streaming media code stream, and resetting the function as a filtering function.
The streaming media transmission device includes, but is not limited to, a server, and any device capable of receiving and/or transmitting streaming media data. In the working process of the streaming media code stream transmission equipment, the transmission of the streaming media code stream comprises two conditions of sending and receiving, namely an outgoing streaming media code stream and an incoming streaming media code stream, wherein the sending of the outgoing streaming media code stream needs to be scheduled by a plurality of functions and is sent to a network by a specific data sending function; the receiving of the incoming streaming media code stream also needs to be scheduled by a plurality of functions, and the specific data receiving function is transferred to an upper layer protocol for processing. Therefore, at least a part of the specific functions inevitably contain streaming media data in a working state, and the streaming media code stream in the functions is obtained by hijacking the specific data sending function and/or the specific data receiving function, wherein the streaming media code stream contains streaming media code stream configuration information and streaming media code stream QoS (Quality of Service, the same below) information. Setting new filter function, and screening qualified stream media code stream according to the target stream media code stream configuration information.
S102: and in the filtering function, filtering the streaming media code stream needing to be analyzed according to the configuration information of the target streaming media code stream.
In the filtering function, the obtained streaming media code stream is compared with the configuration information of the target streaming media code stream, and whether the obtained streaming media code stream is the streaming media code stream to be detected which meets the conditions or not is judged. The target streaming media code stream configuration information comprises configuration parameters of the code stream, and is used for comparing the target streaming media code stream configuration information with the acquired streaming media code stream information and judging whether the target streaming media code stream configuration information meets the conditions or not. Configuration parameters in the target streaming media code stream configuration information include, but are not limited to, an IP (Internet Protocol, the same applies hereinafter) address, a port number, and the like, and configuration parameter items may be increased or decreased according to actual situations, and values of the configuration parameter items may also be adjusted. The target streaming media code stream information can be further divided into preset outgoing streaming media code stream information and preset incoming streaming media code stream information.
When the hijacking specific function is a data transmission function, filtering the streaming media code stream needing to be analyzed according to the configuration information of the target streaming media code stream comprises the following steps: judging whether the streaming media code stream conforms to preset outgoing code stream information or not; if yes, analyzing the stream media code stream; if not, calling a data sending function to send the streaming media code stream.
When the hijacking specific function is a data receiving function, filtering the streaming media code stream needing to be analyzed according to the configuration information of the target streaming media code stream comprises the following steps: judging whether the streaming media code stream conforms to preset incoming code stream information or not; if yes, analyzing the stream media code stream; if not, calling a data receiving function to transfer the streaming media code stream to an upper layer protocol for processing.
The analysis of the streaming media code Stream includes, but is not limited to, RTP (Real-time Transport Protocol, the same below) sequence number analysis, timestamp transmission analysis, code rate calculation according to RTP data in a unit time, code Stream jitter calculation combined with a timestamp, and the like, and further TS (Transport Stream, the same below) code Stream analysis may be performed on the streaming media code Stream, including, but not limited to, I-frame detection, TS sequence number continuity check, and the like. In the related art, the analysis of the streaming media code stream is relatively comprehensive, and the actual operation modes of various analyses are not repeated here.
In some embodiments, the method for detecting streaming media code streams further includes:
s103: and after the streaming media code stream is analyzed, calling the original function to process the streaming media code stream.
When the analyzed stream media code stream is an outgoing stream media code stream, after the stream media code stream is analyzed, a specific data sending function is called to send the stream media code stream; when the analyzed stream media code stream is the incoming stream media code stream, after the stream media code stream is analyzed, a specific data receiving function is called to transmit the stream media code stream to an upper layer protocol for processing.
The following describes a streaming media code stream detection method in an embodiment of the present invention, using a Linux streaming media server as a streaming media transmission device:
in the method for detecting the streaming media code stream in the embodiment, different streaming media code streams are detected and analyzed in real time on the Linux streaming media server node.
Referring to fig. 2, fig. 2 illustrates an application scenario of streaming media server outbound codestream analysis.
When a Linux streaming media server sends streaming media to an outgoing code stream, an upper-layer application calls a class send function to send data, and in a kernel, the data is finally sent through a dev _ queue _ xmit function (a network device interface function, the same below) in a skb (Struct sk _ buffer, the same below), and after the skb function is scheduled, the skb function is sent to a network through a final network card driver ndo _ start _ xmit function (a data sending function, the same below). Skb is a buffer area for receiving and transmitting packets in a TCP/IP (Transmission Control Protocol/Internet Protocol) stack, and the encapsulation and decapsulation of all data packets in the network are performed through this structure.
And hijacking ndo _ start _ xmit function of the network card, and resetting the function to be wit _ stream _ analysis function, wherein the function is used for filtering the stream media code stream meeting the condition. It should be understood that the wit _ stream _ analysis function is only an optional function and is not intended to limit the embodiments of the present invention, and any function that meets the requirements may be used.
In the wit _ stream _ analysis function, according to preset target stream media code stream information including but not limited to information such as IP address and port number, filtering the stream media code stream to be tracked, detected and analyzed, if the stream media code stream meeting the condition exists, further analyzing the stream media code stream; if not, the original ndo _ start _ xmit function of the network card is directly called to send the streaming media code stream to the network.
And further analyzing the streaming media code stream meeting the configuration conditions, including but not limited to RTP sequence number analysis, sending timestamp analysis, code rate calculation according to RTP data in unit time, code stream jitter calculation by combining a timestamp and the like. Further TS code stream analysis can be performed according to configuration conditions, including but not limited to I frame detection, TS serial number continuity check and the like.
After the streaming media code stream is analyzed, an ndo _ start _ xmit function of the original network card is called to send the streaming media code stream to the network.
Referring to fig. 3, fig. 3 depicts an application scenario of streaming media server inbound codestream analysis.
When the Linux streaming media server receives streaming media incoming code streams, data is received through a network card drive, a netif _ receive _ skb function (receiving function) is used in a Linux kernel to receive the data, and the data is transmitted to an upper layer protocol for processing through an ip _ rcv function (data receiving function, the same below).
An ip _ rcv function in the Linux kernel is registered in an ip _ packet _ type structure. And the func member variable in the ip _ packet _ type is hijacked and reset to wit _ stream _ rcv function, so as to filter the stream media code stream meeting the condition. It should be understood that the wit _ stream _ rcv function is only an optional function and is not intended to limit the embodiments of the present invention, and any function may be satisfied.
In the wit _ stream _ rcv function, according to preset target stream media code stream information including but not limited to information such as IP address and port number, filtering the stream media code stream to be tracked, detected and analyzed, and if the stream media code stream meeting the condition exists, further analyzing the stream media code stream; if not, directly calling the ip _ rcv function to transfer the streaming media code stream to an upper layer protocol for processing.
And further analyzing the streaming media code stream meeting the configuration conditions, including but not limited to RTP sequence number analysis, sending timestamp analysis, code rate calculation according to RTP data in unit time, code stream jitter calculation by combining a timestamp and the like. Further TS code stream analysis can be performed according to configuration conditions, including but not limited to I frame detection, TS serial number continuity check and the like.
And after the stream media code stream is analyzed, calling an ip _ rcv function to transfer the stream media code stream to an upper layer protocol for processing.
In the method for detecting the streaming media code stream provided by the embodiment of the invention, a specific function is hijacked and set as a new filtering function on a streaming media server node in the transmission process of streaming media data, and the streaming media code stream needing to be tracked, detected and analyzed is filtered in the filtering function according to preset streaming media code stream configuration information so as to be further analyzed; when the stream media code stream does not accord with the target stream media code stream configuration information or the stream media code stream which accords with the conditions is analyzed, the original function is called to normally process the stream media code stream. The stream media code stream meeting the conditions is directly acquired on the stream media server node, so that the real-time performance of stream media code stream detection is ensured, server configuration and network configuration do not need to be changed, and a large amount of investment caused by bypass on a data link is avoided; the real-time performance and the convenience of stream media code stream detection are improved, and the stream media code stream detection cost is reduced.
Example two:
in order to solve the problems in the related art that the detection of the streaming media code stream needs to be performed on line and then analyzed by a tool, the real-time performance is poor, and the performance of the packet capturing tool influences the analysis result of the code stream; or a dedicated device is needed, a bypass is made on a data link to transform a network, and a relatively large investment is made, an embodiment of the present invention provides a stream media code stream detection apparatus, as shown in fig. 4, including a detection module 41, an analysis module 42, and a configuration module 43.
The detection module 41 is used for hijacking a specific function of the streaming media transmission device in the process of transmitting the streaming media code stream, and resetting the function as a filtering function.
The streaming media transmission device includes, but is not limited to, a server, and any device capable of receiving and/or transmitting streaming media data. In the working process of the streaming media code stream transmission equipment, the transmission of the streaming media code stream comprises two conditions of sending and receiving, namely an outgoing streaming media code stream and an incoming streaming media code stream, wherein the sending of the outgoing streaming media code stream needs to be scheduled by a plurality of functions and is sent to a network by a specific data sending function; the receiving of the incoming streaming media code stream also needs to be scheduled by a plurality of functions, and the specific data receiving function is transferred to an upper layer protocol for processing. Therefore, at least a part of the specific functions inevitably contain streaming media data in a working state, and the streaming media code stream in the functions is obtained by hijacking the specific data sending function and/or the specific data receiving function, wherein the streaming media code stream contains streaming media code stream configuration information and streaming media code stream QoS (Quality of Service, the same below) information. Setting new filter function, and screening qualified stream media code stream according to the target stream media code stream configuration information.
And the analysis module 42 is configured to filter, in the filter function, the streaming media code stream that needs to be analyzed according to the target streaming media code stream configuration information.
In the filtering function, the obtained streaming media code stream is compared with the configuration information of the target streaming media code stream, and whether the obtained streaming media code stream is the streaming media code stream to be detected which meets the conditions or not is judged. The target streaming media code stream configuration information comprises configuration parameters of the code stream, and is used for comparing the target streaming media code stream configuration information with the acquired streaming media code stream information and judging whether the target streaming media code stream configuration information meets the conditions or not. The target streaming media code stream information can be further divided into preset outgoing streaming media code stream information and preset incoming streaming media code stream information.
When the hijacking specific function is a data transmission function, filtering the streaming media code stream needing to be analyzed according to the configuration information of the target streaming media code stream comprises the following steps: judging whether the streaming media code stream conforms to preset outgoing code stream information or not; if yes, analyzing the stream media code stream; if not, calling a data sending function to send the streaming media code stream.
When the hijacking specific function is a data receiving function, filtering the streaming media code stream needing to be analyzed according to the configuration information of the target streaming media code stream comprises the following steps: judging whether the streaming media code stream conforms to preset incoming code stream information or not; if yes, analyzing the stream media code stream; if not, calling a data receiving function to transfer the streaming media code stream to an upper layer protocol for processing.
The analysis of the streaming media code Stream includes, but is not limited to, RTP (Real-time Transport Protocol, the same below) sequence number analysis, timestamp transmission analysis, code rate calculation according to RTP data in a unit time, code Stream jitter calculation combined with a timestamp, and the like, and further TS (Transport Stream, the same below) code Stream analysis may be performed on the streaming media code Stream, including, but not limited to, I-frame detection, TS sequence number continuity check, and the like. In the related art, the analysis of the streaming media code stream is relatively comprehensive, and the actual operation modes of various analyses are not repeated here.
The analysis module 42 is further configured to call the primitive function to process the streaming media code stream after the streaming media code stream is analyzed.
When the analyzed stream media code stream is an outgoing stream media code stream, the analysis module calls a specific data transmission function to transmit the stream media code stream after the stream media code stream is analyzed; when the analyzed stream media code stream is an incoming stream media code stream, the analysis module calls a specific data receiving function to transmit the stream media code stream to an upper layer protocol for processing after the stream media code stream is analyzed.
And the configuration module 43 is configured and stores the target streaming media code stream configuration information. Configuration parameters in the target streaming media code stream configuration information include, but are not limited to, an IP (Internet Protocol, the same applies hereinafter) address, a port number, and the like, and configuration parameter items may be increased or decreased according to actual situations, and values of the configuration parameter items may also be configured.
The following describes the working process of the streaming media stream detection device in the embodiment of the present invention with a Linux streaming media server as a streaming media transmission device:
the detection device for the streaming media code stream in the embodiment detects and analyzes different streaming media code streams in real time on the Linux streaming media server node. Preferably, the detection device of the streaming media code stream in this embodiment acts on the Linux streaming media server node in the form of software.
Referring to fig. 5, fig. 5 illustrates an application scenario of the detection apparatus for streaming media code stream in the embodiment in the streaming media server outgoing code stream analysis.
When a Linux streaming media server sends streaming media to an outgoing code stream, an upper-layer application calls a class send function to send data, and in a kernel, the data is finally sent through a dev _ queue _ xmit function (a network device interface function, the same below) in a skb (Struct sk _ buffer, the same below), and after the skb function is scheduled, the skb function is sent to a network through a final network card driver ndo _ start _ xmit function (a data sending function, the same below). Skb is a buffer area for receiving and transmitting packets in a TCP/IP (Transmission Control Protocol/Internet Protocol) stack, and the encapsulation and decapsulation of all data packets in the network are performed through this structure.
The detection module hijacks the ndo _ start _ xmit function of the network card and resets to wit _ stream _ analysis function for filtering the stream media code stream meeting the condition. It should be understood that the wit _ stream _ analysis function is only an optional function and is not intended to limit the embodiments of the present invention, and any function that meets the requirements may be used.
In the wit _ stream _ analysis function, an analysis module filters a stream media code stream to be tracked, detected and analyzed according to preset target stream media code stream information in a configuration module, including but not limited to information such as an IP address and a port number, and if the stream media code stream meeting the condition exists, further analyzes the stream media code stream; if not, the original ndo _ start _ xmit function of the network card is directly called to send the streaming media code stream to the network.
And further analyzing the streaming media code stream meeting the configuration conditions, including but not limited to RTP sequence number analysis, sending timestamp analysis, code rate calculation according to RTP data in unit time, code stream jitter calculation by combining a timestamp and the like. Further TS code stream analysis can be performed according to configuration conditions, including but not limited to I frame detection, TS serial number continuity check and the like.
After the streaming media code stream is analyzed, the analysis module calls an ndo _ start _ xmit function of the original network card to send the streaming media code stream to the network.
Referring to fig. 6, fig. 6 illustrates an application scenario of the detection apparatus for streaming media code stream in the embodiment in the analysis of outgoing code stream of the streaming media server.
When the Linux streaming media server receives streaming media incoming code streams, data is received through a network card drive, a netif _ receive _ skb function (receiving function) is used in a Linux kernel to receive the data, and the data is transmitted to an upper layer protocol for processing through an ip _ rcv function (data receiving function, the same below).
An ip _ rcv function in the Linux kernel is registered in an ip _ packet _ type structure. The detection module resets the func member variable in the ip _ packet _ type to wit _ stream _ rcv function by hijacking and resetting, so as to filter the stream media code stream meeting the condition. It should be understood that the wit _ stream _ rcv function is only an optional function and is not intended to limit the embodiments of the present invention, and any function may be satisfied.
In the wit _ stream _ rcv function, an analysis module filters a stream media code stream to be tracked, detected and analyzed according to preset target stream media code stream information in a configuration module, including but not limited to information such as an IP address and a port number, and if a stream media code stream meeting the condition exists, further analyzes the stream media code stream; if not, directly calling the ip _ rcv function to transfer the streaming media code stream to an upper layer protocol for processing.
And further analyzing the streaming media code stream meeting the configuration conditions, including but not limited to RTP sequence number analysis, sending timestamp analysis, code rate calculation according to RTP data in unit time, code stream jitter calculation by combining a timestamp and the like. Further TS code stream analysis can be performed according to configuration conditions, including but not limited to I frame detection, TS serial number continuity check and the like.
After the stream media code stream is analyzed, the analysis module calls an ip _ rcv function to transfer the stream media code stream to an upper layer protocol for processing.
In the streaming media code stream detection device provided by the embodiment of the invention, in the transmission process of streaming media data, a specific function is hijacked by a detection module and is set as a new filtering function on a streaming media server node, and in the filtering function, an analysis module filters out a streaming media code stream which needs to be tracked, detected and analyzed according to preset streaming media code stream configuration information in a configuration module so as to carry out further analysis; the analysis module calls the primitive function to normally process the stream media code stream which does not accord with the target stream media code stream configuration information and accords with the conditions after the analysis is finished, and directly obtains the stream media code stream which accords with the conditions on the stream media server node, thereby ensuring the real-time performance of the stream media code stream detection, avoiding the great investment caused by bypassing on a data link without changing the server configuration and the network configuration; the real-time performance and the convenience of stream media code stream detection are improved, and the stream media code stream detection cost is reduced.
EXAMPLE III
In order to solve the problems in the related art that the detection of the streaming media code stream needs to be performed on line and then analyzed by a tool, the real-time performance is poor, and the performance of the packet capturing tool influences the analysis result of the code stream; or a proprietary device is needed to bypass a data link to modify a network, which is a relatively large problem, an embodiment of the present invention provides a server, as shown in fig. 7, including a processor 71, a memory 72, and a communication bus 73, where:
the communication bus 73 is used for realizing connection communication between the processor 71 and the memory 72;
the processor 71 is configured to execute one or more computer programs stored in the memory 72 to implement at least one step of the streaming media code stream detection method in the first embodiment.
The present embodiments also provide a computer-readable storage medium including volatile or non-volatile, removable or non-removable media implemented in any method or technology for storage of information such as computer-readable instructions, data structures, computer program modules or other data. Computer-readable storage media include, but are not limited to, RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash Memory or other Memory technology, CD-ROM (Compact disk Read-Only Memory), Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer.
The computer-readable storage medium in this embodiment may be used to store a computer program, where the stored computer program may be executed by a processor to implement at least one step in the streaming media code stream detection method in the first embodiment.
The embodiment also provides a computer program (or computer software), which can be distributed on a computer-readable medium and executed by a computing device to implement at least one step of the streaming media code stream detection method in the first embodiment; and in some cases at least one of the steps shown or described may be performed in an order different than that described in the embodiments above.
The present embodiments also provide a computer program product comprising a computer readable means on which a computer program as shown above is stored. The computer readable means in this embodiment may include a computer readable storage medium as shown above.
It will be apparent to those skilled in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software (which may be implemented in computer program code executable by a computing device), firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit.
In addition, communication media typically embodies computer readable instructions, data structures, computer program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to one of ordinary skill in the art. Thus, the present invention is not limited to any specific combination of hardware and software.
The foregoing is a more detailed description of embodiments of the present invention, and the present invention is not to be considered limited to such descriptions. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.

Claims (12)

1. A method for detecting streaming media code streams comprises the following steps:
hijacking a specific function of the streaming media transmission equipment in the process of transmitting the streaming media code stream, and resetting the function as a filtering function;
and in the filtering function, filtering the streaming media code stream needing to be analyzed according to the configuration information of the target streaming media code stream.
2. The method for detecting streaming media code stream according to claim 1, wherein when the specific hijacked function is a data transmission function, the filtering the streaming media code stream to be analyzed according to the configuration information of the target streaming media code stream includes:
judging whether the streaming media code stream conforms to preset outgoing streaming media code stream information or not;
if yes, analyzing the stream media code stream; if not, calling the data sending function to send the streaming media code stream.
3. The method according to claim 2, wherein the streaming media code stream is transmitted by calling the data transmission function after the streaming media code stream is analyzed.
4. The method for detecting streaming media code stream according to claim 1, wherein when the specific hijacked function is a data receiving function, the filtering the streaming media code stream to be processed according to the configuration information of the target streaming media code stream includes:
judging whether the streaming media code stream conforms to preset incoming streaming media code stream information or not;
if yes, analyzing the stream media code stream; if not, the data receiving function is called to transfer the streaming media code stream to an upper layer protocol for processing.
5. The method according to claim 4, wherein after the streaming media code stream is analyzed, the data receiving function is called to transfer the streaming media code stream to an upper protocol for processing.
6. A stream media code stream detection device comprises:
the detection module is used for hijacking a specific function in the streaming media code stream receiving and sending equipment and resetting the specific function as a filtering function;
the analysis module is used for filtering the streaming media code stream needing to be analyzed according to the configuration information of the target streaming media code stream in the filter function;
and the configuration module is used for configuring and storing the target streaming media code stream configuration information.
7. The apparatus for detecting streaming media code stream according to claim 6, wherein when the specific function hijacked by the detection module is a data transmission function, the analyzing module filtering the streaming media code stream to be analyzed according to the configuration information of the target streaming media code stream includes:
judging whether the streaming media code stream conforms to preset outgoing streaming media code stream information or not;
if yes, analyzing the stream media code stream; if not, calling the data sending function to send the streaming media code stream.
8. The apparatus for detecting streaming media code stream according to claim 7, wherein the analyzing module calls the data sending function to send the streaming media code stream after the analyzing of the streaming media code stream is completed.
9. The apparatus for detecting streaming media code stream according to claim 6, wherein when the specific function hijacked by the detection module is a data receiving function, the filtering, by the analysis module, the streaming media code stream that needs to be processed according to the configuration information of the target streaming media code stream includes:
judging whether the streaming media code stream conforms to preset incoming streaming media code stream information or not;
if yes, analyzing the stream media code stream; if not, the data receiving function is called to transfer the streaming media code stream to an upper layer protocol for processing.
10. The apparatus for detecting streaming media code stream according to claim 9, wherein the analyzing module calls the data receiving function to transmit the streaming media code stream to an upper layer protocol for processing after the analyzing of the streaming media code stream is completed.
11. A server comprising a processor, a memory, and a communication bus;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute one or more computer programs stored in the memory to implement the steps of the streaming media code stream detection method according to any one of claims 1 to 5.
12. A computer readable storage medium storing one or more computer programs, the one or more computer programs being executable by one or more processors to implement the steps of the streaming media codestream detection method according to any one of claims 1 to 5.
CN201911359458.5A 2019-12-25 2019-12-25 Stream media code stream detection method, device, server and readable storage medium Pending CN113037532A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911359458.5A CN113037532A (en) 2019-12-25 2019-12-25 Stream media code stream detection method, device, server and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911359458.5A CN113037532A (en) 2019-12-25 2019-12-25 Stream media code stream detection method, device, server and readable storage medium

Publications (1)

Publication Number Publication Date
CN113037532A true CN113037532A (en) 2021-06-25

Family

ID=76458704

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911359458.5A Pending CN113037532A (en) 2019-12-25 2019-12-25 Stream media code stream detection method, device, server and readable storage medium

Country Status (1)

Country Link
CN (1) CN113037532A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114338439A (en) * 2021-12-27 2022-04-12 上海观安信息技术股份有限公司 Universal network flow analysis device and method
CN116886678A (en) * 2023-09-06 2023-10-13 中移(杭州)信息技术有限公司 Abnormal code stream filtering method, system, electronic equipment and storage medium

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1633110A (en) * 2005-01-14 2005-06-29 中国科学院计算技术研究所 Flow analysis method based on Linux core
CN1767662A (en) * 2005-11-21 2006-05-03 上海八六三信息安全产业基地有限公司 Stream media information detecting and content monitoring system based on broadband network
CN101355706A (en) * 2008-08-15 2009-01-28 中兴通讯股份有限公司 Method and apparatus for analyzing multiplexing code stream of multiplexer
US7742429B1 (en) * 2004-01-15 2010-06-22 Zte Corporation Method and system of promptly processing real-time media stream data packet
CN101754002A (en) * 2008-12-02 2010-06-23 中兴通讯股份有限公司 Video monitoring system and realization method for dual-stream monitoring front end thereof
CN102421005A (en) * 2011-11-22 2012-04-18 广州中大电讯科技有限公司 Embedded type based code stream analysis system
US20120192223A1 (en) * 2011-01-25 2012-07-26 Hon Hai Precision Industry Co., Ltd. Set-top box and program recording method
CN103503401A (en) * 2011-12-31 2014-01-08 华为技术有限公司 Stream media data processing method, device and system
US20150131001A1 (en) * 2013-11-14 2015-05-14 Samsung Techwin Co., Ltd. Image processing apparatus based on open platform and protocol conversion method used for the same
US20150163493A1 (en) * 2011-11-18 2015-06-11 Chongji Huang Motion Analysis Method and Code Stream Conversion Method Based on Video Compression Code Stream and Apparatus Thereof
US20160014421A1 (en) * 2014-07-14 2016-01-14 Apple Inc. Encoding blocks in video frames containing text using histograms of gradients
CN107493508A (en) * 2017-08-22 2017-12-19 四川长虹电器股份有限公司 method based on Android intelligent terminal streaming media playing performance monitoring
CN109558726A (en) * 2018-09-29 2019-04-02 四川大学 A kind of control stream hijack attack detection technique and system based on dynamic analysis
CN109600743A (en) * 2018-08-17 2019-04-09 浙江宇视科技有限公司 A kind of method and device of reversed detection wireless access device
CN110351533A (en) * 2019-08-12 2019-10-18 桂林电子科技大学 The network transmission monitoring system and its implementation of video image processing based on Linux

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7742429B1 (en) * 2004-01-15 2010-06-22 Zte Corporation Method and system of promptly processing real-time media stream data packet
CN1633110A (en) * 2005-01-14 2005-06-29 中国科学院计算技术研究所 Flow analysis method based on Linux core
CN1767662A (en) * 2005-11-21 2006-05-03 上海八六三信息安全产业基地有限公司 Stream media information detecting and content monitoring system based on broadband network
CN101355706A (en) * 2008-08-15 2009-01-28 中兴通讯股份有限公司 Method and apparatus for analyzing multiplexing code stream of multiplexer
CN101754002A (en) * 2008-12-02 2010-06-23 中兴通讯股份有限公司 Video monitoring system and realization method for dual-stream monitoring front end thereof
US20120192223A1 (en) * 2011-01-25 2012-07-26 Hon Hai Precision Industry Co., Ltd. Set-top box and program recording method
US20150163493A1 (en) * 2011-11-18 2015-06-11 Chongji Huang Motion Analysis Method and Code Stream Conversion Method Based on Video Compression Code Stream and Apparatus Thereof
CN102421005A (en) * 2011-11-22 2012-04-18 广州中大电讯科技有限公司 Embedded type based code stream analysis system
CN103503401A (en) * 2011-12-31 2014-01-08 华为技术有限公司 Stream media data processing method, device and system
US20150131001A1 (en) * 2013-11-14 2015-05-14 Samsung Techwin Co., Ltd. Image processing apparatus based on open platform and protocol conversion method used for the same
US20160014421A1 (en) * 2014-07-14 2016-01-14 Apple Inc. Encoding blocks in video frames containing text using histograms of gradients
CN107493508A (en) * 2017-08-22 2017-12-19 四川长虹电器股份有限公司 method based on Android intelligent terminal streaming media playing performance monitoring
CN109600743A (en) * 2018-08-17 2019-04-09 浙江宇视科技有限公司 A kind of method and device of reversed detection wireless access device
CN109558726A (en) * 2018-09-29 2019-04-02 四川大学 A kind of control stream hijack attack detection technique and system based on dynamic analysis
CN110351533A (en) * 2019-08-12 2019-10-18 桂林电子科技大学 The network transmission monitoring system and its implementation of video image processing based on Linux

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
JUNFENG JIN等: "rror-Resilient Video Multicast with Layered Hybrid FEC/ARQ over Broadband Wireless Networks", 《2011 IEEE GLOBAL TELECOMMUNICATIONS CONFERENCE - GLOBECOM 2011》 *
吴伟信;: "移动流媒体系统中自适应码流传输研究", 泉州师范学院学报, no. 06 *
夏红燕;: "一种数字视频网络传输的设计与实现", 电脑知识与技术, no. 27 *
程根法;: "一种网络式码流监测仪的设计方案研究", 合肥工业大学学报(自然科学版), no. 07 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114338439A (en) * 2021-12-27 2022-04-12 上海观安信息技术股份有限公司 Universal network flow analysis device and method
CN114338439B (en) * 2021-12-27 2023-08-08 上海观安信息技术股份有限公司 Universal network flow analysis device and method
CN116886678A (en) * 2023-09-06 2023-10-13 中移(杭州)信息技术有限公司 Abnormal code stream filtering method, system, electronic equipment and storage medium
CN116886678B (en) * 2023-09-06 2023-12-05 中移(杭州)信息技术有限公司 Abnormal code stream filtering method, system, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US10484465B2 (en) Combining stateless and stateful server load balancing
US10447775B2 (en) System and method to balance servers based on server load status
EP3364603A1 (en) Flow and time based reassembly of fragmented packets by ip protocol analyzers
CN113114702B (en) WebRTC communication method and system based on SIP protocol interaction at IOS end
WO2016009250A1 (en) Methods and systems for transmitting data packets
KR102227933B1 (en) Method and electronic control unit for communication networks
US20060288096A1 (en) Integrated monitoring for network and local internet protocol traffic
US9935968B2 (en) Selective traffic analysis at a communication network edge
CN107360247B (en) The method and the network equipment of processing business
CN113037532A (en) Stream media code stream detection method, device, server and readable storage medium
US11190453B2 (en) Dynamic quality of service for over-the-top content
WO2020206849A1 (en) Method and system for processing dhcp data with vlan tag
RU2621961C2 (en) Gateway and corresponding method, computer program and storage media
CN102164077A (en) Bandwidth control method, device and router
US20210120048A1 (en) Voice over internet protocol (voip) call quality
KR101426464B1 (en) Apparatus and method extraction qos parameter in mobile equipment
CN110830419B (en) Access control method and device for internet protocol camera
CN110690990A (en) Server upgrading method and device, electronic equipment and storage medium
US20140075038A1 (en) Communication device, computer-readable storage medium, and communication system
CN116938895B (en) Media data packet acquisition method and device, electronic equipment and storage medium
CN1809995A (en) Method and device for processing real-time data
JP5868824B2 (en) Distributed processing system and distributed processing method
EP3350969A1 (en) Multiplexing data
EP2463777A1 (en) System for improving performance of a real time communication application
WO2021072744A1 (en) Improved voice over internet protocol (voip) call quality

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